Re: typemode for variable types

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: typemode for variable types
Дата
Msg-id 20140224202410.GT4759@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: typemode for variable types  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: typemode for variable types  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Bruce Momjian escribió:
> On Sun, Feb 23, 2014 at 07:50:08AM +0330, Mohsen SM wrote:
> > Hello.
> > I have a new type similar to varchar.
> > I want to fine how did I can to calculate typemod
> > and where must I calculate typemod for this type.
> 
> Well, typmods are type-specific, so there is no official way to
> calculate it.  I would look at how an existing type uses typmod and copy
> that.

Our system is pretty neat.  See a complex example here:
https://github.com/postgis/postgis/blob/svn-trunk/postgis/gserialized_typmod.c

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: typemode for variable types
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: often PREPARE can generate high load (and sometimes minutes long unavailability)