X-Original-To: pgsql-hackers-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id B77099FB1CF for ; Thu, 3 Aug 2006 17:50:02 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 50677-07 for ; Thu, 3 Aug 2006 20:49:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svana.org (svana.org [125.62.87.134]) by postgresql.org (Postfix) with ESMTP id 21A529FA2D3 for ; Thu, 3 Aug 2006 17:49:57 -0300 (ADT) Received: from kleptog by svana.org with local (Exim 4.50) id 1G8k8g-0007bA-Dr; Fri, 04 Aug 2006 06:49:54 +1000 Date: Thu, 3 Aug 2006 22:49:54 +0200 From: Martijn van Oosterhout To: Tom Lane Cc: Teodor Sigaev , Pgsql Hackers Subject: Re: User-defined typle similar to char(length) varchar(length) Message-ID: <20060803204954.GF20080@svana.org> Reply-To: Martijn van Oosterhout References: <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> <20060803193754.GD20080@svana.org> <25285.1154636333@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gdTfX7fkYsEEjebm" Content-Disposition: inline In-Reply-To: <25285.1154636333@sss.pgh.pa.us> 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 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200608/160 X-Sequence-Number: 87653 --gdTfX7fkYsEEjebm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 03, 2006 at 04:18:53PM -0400, Tom Lane wrote: > > 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. >=20 > I think we could legislate that the stored typmod is the same as what > the user sees (and can't be negative). The fact that it's different > for some of the built-in types is a historical artifact that I'd love > to get rid of. But that makes NUMERIC(x,y) impossible to represent. That probably ok I guess. I was just wondering if it would be reasonable to allow users to create a currency type whose precision can be specified the same way as for numeric. Have a nice day, --=20 Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to l= itigate. --gdTfX7fkYsEEjebm 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) iD8DBQFE0mFyIB7bNG8LQkwRAmNbAJ9tXO27FOUixSpytzKtdFrsaTp6ZgCaAzjA fWgsJpZknbL4MA5CthFuabU= =ZXDf -----END PGP SIGNATURE----- --gdTfX7fkYsEEjebm--