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: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: User-defined typle similar to char(length) varchar(length)
Date: 2006-08-03 19:37:54
Message-ID: 20060803193754.GD20080@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)sigaev(dot)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(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

--
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

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-08-03 20:18:53 Re: User-defined typle similar to char(length) varchar(length)
Previous Message Martijn van Oosterhout 2006-08-03 19:23:41 Re: Bug with initDB under windows 2003