Re: User-defined typle similar to char(length) varchar(length) - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: User-defined typle similar to char(length) varchar(length)
Date
Msg-id 20060731131520.GE29868@svana.org
Whole thread Raw
In response to User-defined typle similar to char(length) varchar(length)  (Teodor Sigaev <teodor@sigaev.ru>)
Responses Re: User-defined typle similar to char(length) varchar(length)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Jul 31, 2006 at 05:04:00PM +0400, Teodor Sigaev wrote:
> Is it possible to create user-defined type with optional length in create
> table similar to char()/varchar()/bit()? Without modification gram.y of
> course...

No. Search the archives for discussions about "user defined typmod".
The basic problem came down too that the set of allowed words for
functions and types would be forced to be the same (due to restrictions
in lookahead), and people wern't happy with that because if may hamper
future SQL compatability. There were ways around this (all fairly ugly
though).

Note: this is what I remember about the discussions anyway.

I'm sure a lot of people would be happy if someone took this on though.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Connection limit and Superuser
Next
From: Rod Taylor
Date:
Subject: Re: Connection limit and Superuser