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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

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


  • From: Teodor Sigaev <teodor@sigaev.ru>
  • To: Tom Lane <tgl@sss.pgh.pa.us>
  • Cc: Martijn van Oosterhout <kleptog@svana.org>, Pgsql Hackers <pgsql-hackers@postgresql.org>
  • Subject: Re: User-defined typle similar to char(length) varchar(length)
  • Date: Thu, 03 Aug 2006 22:24:43 +0400
  • Message-id: <44D23F6B.3090801@sigaev.ru>

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/

Attachment: user_defined_typmod.gz
Description: Unix tar archive



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group