Re: Custom integer-like type

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Custom integer-like type
Дата
Msg-id 14978.1347638262@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Custom integer-like type  (Ivan Voras <ivoras@freebsd.org>)
Список pgsql-general
Ivan Voras <ivoras@freebsd.org> writes:
> I'm creating a new data in C, and everything is proceeding well, except
> that the data type should be parsed on input like an integer. Maybe it's
> best if I explain it with an example:

> Currently, I can do this:

> INSERT INTO t(my_data_type) VALUES ('1')

> but I cannot do this:

> INSERT INTO t(my_data_type) VALUES (1)

What you'd need for that is an assignment cast from integer to myint.
Literal 1 is an integer, period; it's not going to get fed to your
type's input routine.

            regards, tom lane


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

Предыдущее
От: Ivan Voras
Дата:
Сообщение: Custom integer-like type
Следующее
От: "Ing.Edmundo.Robles.Lopez"
Дата:
Сообщение: OFFTOPIC: core dumped with strcpy,atoi,sprintf.