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 20060803193754.GD20080@svana.org
Whole thread Raw
In response to Re: 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)
List pgsql-hackers
I'm surprised you got the patch so small. Mind you, you didn't do any
folding in the productions for NUMERIC and CHAR which in the long term
would probably need to be done. Also, there's the issue of converting
the arguments to a typmod, in the long term it'd have to be
user-defined per type.

Still, it looks good so far, just some way to go still...

Have a nice day,

On Thu, Aug 03, 2006 at 10:24:43PM +0400, Teodor Sigaev wrote:
> >or so timeframe ... but feel free to improve it if you can.
>
> I'm not very familiar with yacc/bison, so pls, review attached patch. I may
> miss something... It's based on ideas in previous discussions:
> http://www.pgsql.ru/db/mw/msg.html?mid=1995063
> http://www.pgsql.ru/db/mw/msg.html?mid=2091842
>
> Patch adds support of typmod to any type, support of typmod to
> format_type().
> I partially make typename and function name as different set except forms
> like
> "select TYPE 'asd'" or "select TYPE(N) 'asd'".
>
> Type modifier can be only one integer >=0, however grammar rules allow it
> to be list of expressions. It was done for simplify far future :)
>
>
> --
> Teodor Sigaev                                   E-mail: teodor@sigaev.ru
>                                                    WWW:
>                                                    http://www.sigaev.ru/
>


>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly


--
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: Martijn van Oosterhout
Date:
Subject: Re: Bug with initDB under windows 2003
Next
From: Tom Lane
Date:
Subject: Re: User-defined typle similar to char(length) varchar(length)