User defined type without single quotes

Поиск
Список
Период
Сортировка
От Rodrigo Barboza
Тема User defined type without single quotes
Дата
Msg-id CANs8QJbj9Ez6yjRy+pq2-bfBMq5wExzi1-WyCWwBfuB3AusaqQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: User defined type without single quotes
Список pgsql-docs
Hello.
I defined a new type to represent an unsigned int, but when I try do run a query it complains because it is not quoted and casted to my type.

Suppose I have a table:

-- my_uint32 is my new type
CREATE TABLE test (a my_uin32);

If I try to run this insert, postgres complain about the type:
INSERT INTO teste (a) VALUES (10);

But this one works:
NSERT INTO teste (a) VALUES ('10'::my_uint);

Is there a way to avoid the single quotes?

В списке pgsql-docs по дате отправления: