datatype: not variable, not fixed length
hi,
i'd like to write a datatype which is similar to varchar, i want the
programmer be able to set its length when he creates the table. but
it seems that there are only 2 options: completely variable or fixed.
so do i have to write an new basic type and recompile postgresql?
thanks,
moritz
--
Well variable is defined at creation time, see char() and varchar().
text data type is truely variable. pg_attribute.atttypmod has info
about the lenght.
---------------------------------------------------------------------------
Moritz Sinn wrote:
hi,
i'd like to write a datatype which is similar to varchar, i want the
programmer be able to set its length when he creates the table. but
it seems that there are only 2 options: completely variable or fixed.
so do i have to write an new basic type and recompile postgresql?thanks,
moritz--
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073