Skip site navigation (1) Skip section navigation (2)

Re: User-defined typle similar to char(length) varchar(length)

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: User-defined typle similar to char(length) varchar(length)
Date: 2006-07-31 13:15:20
Message-ID: 20060731131520.GE29868@svana.org (view raw or flat)
Thread:
Lists: 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(at)svana(dot)org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

pgsql-hackers by date

Next:From: Rod TaylorDate: 2006-07-31 13:15:26
Subject: Re: Connection limit and Superuser
Previous:From: Andrew DunstanDate: 2006-07-31 13:15:03
Subject: Re: Connection limit and Superuser

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group