Custom integer-like type

Поиск
Список
Период
Сортировка
От Ivan Voras
Тема Custom integer-like type
Дата
Msg-id k2vhva$1tg$1@ger.gmane.org
обсуждение исходный текст
Ответы Re: Custom integer-like type  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hello,

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)

My type is defined as:

CREATE TYPE myint (
   internallength = variable,
   input = encbigint_in,
   output = encbigint_out,
   alignment = int4,
   storage = external
);

(The "variable" length is correct in this case.)


Вложения

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

Предыдущее
От: Steve Crawford
Дата:
Сообщение: Re: Need help in reclaiming disk space by deleting the selected records
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Custom integer-like type