X-Original-To: pgsql-hackers-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 19CA79FB259 for ; Thu, 3 Aug 2006 16:38:14 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 62823-01 for ; Thu, 3 Aug 2006 16:38:01 -0300 (ADT) X-Greylist: delayed 00:14:17.444925 by SQLgrey- Received: from svana.org (svana.org [125.62.87.134]) by postgresql.org (Postfix) with ESMTP id 7C5979FB26A for ; Thu, 3 Aug 2006 16:38:01 -0300 (ADT) Received: from kleptog by svana.org with local (Exim 4.50) id 1G8j10-0007Km-E0; Fri, 04 Aug 2006 05:37:54 +1000 Date: Thu, 3 Aug 2006 21:37:54 +0200 From: Martijn van Oosterhout To: Teodor Sigaev Cc: Tom Lane , Pgsql Hackers Subject: Re: User-defined typle similar to char(length) varchar(length) Message-ID: <20060803193754.GD20080@svana.org> Reply-To: Martijn van Oosterhout References: <44CDFFC0.3070002@sigaev.ru> <20060731131520.GE29868@svana.org> <14115.1154353736@sss.pgh.pa.us> <44CF56BF.9070003@sigaev.ru> <1748.1154438988@sss.pgh.pa.us> <44CF6983.5060605@sigaev.ru> <20060801145156.GH30427@svana.org> <29387.1154489219@sss.pgh.pa.us> <44D23F6B.3090801@sigaev.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="u65IjBhB3TIa72Vp" Content-Disposition: inline In-Reply-To: <44D23F6B.3090801@sigaev.ru> X-PGP-Key-ID: Length=1024; ID=0x0DC67BE6 X-PGP-Key-Fingerprint: 295F A899 A81A 156D B522 48A7 6394 F08A 0DC6 7BE6 X-PGP-Key-URL: User-Agent: Mutt/1.5.9i X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kleptog@svana.org X-SA-Exim-Scanned: No (on svana.org); SAEximRunCond expanded to false X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.212 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200608/156 X-Sequence-Number: 87649 --u65IjBhB3TIa72Vp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > I'm not very familiar with yacc/bison, so pls, review attached patch. I m= ay=20 > miss something... It's based on ideas in previous discussions: > http://www.pgsql.ru/db/mw/msg.html?mid=3D1995063 > http://www.pgsql.ru/db/mw/msg.html?mid=3D2091842 >=20 > Patch adds support of typmod to any type, support of typmod to=20 > format_type(). > I partially make typename and function name as different set except forms= =20 > like > "select TYPE 'asd'" or "select TYPE(N) 'asd'". >=20 > Type modifier can be only one integer >=3D0, however grammar rules allow = it=20 > to be list of expressions. It was done for simplify far future :) >=20 >=20 > --=20 > Teodor Sigaev E-mail: teodor@sigaev.ru > WWW:=20 > http://www.sigaev.ru/ >=20 >=20 > ---------------------------(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 --=20 Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to l= itigate. --u65IjBhB3TIa72Vp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFE0lCSIB7bNG8LQkwRAm0qAJ9geLg+JBwYq/bk2JjE9PAGvTWhSgCfY5x3 9CVMjY2F8cOsvEPBGHw36Pk= =A0Vg -----END PGP SIGNATURE----- --u65IjBhB3TIa72Vp--