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 857049FB39F for ; Fri, 4 Aug 2006 11:27:23 -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 48760-06 for ; Fri, 4 Aug 2006 11:27:17 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svana.org (svana.org [125.62.87.134]) by postgresql.org (Postfix) with ESMTP id 9237B9FB0D1 for ; Fri, 4 Aug 2006 11:27:17 -0300 (ADT) Received: from kleptog by svana.org with local (Exim 4.50) id 1G90ds-0002GL-Kg; Sat, 05 Aug 2006 00:27:12 +1000 Date: Fri, 4 Aug 2006 16:27:12 +0200 From: Martijn van Oosterhout To: Tom Lane , Teodor Sigaev , Pgsql Hackers Subject: Re: User-defined typle similar to char(length) varchar(length) Message-ID: <20060804142712.GI2478@svana.org> Reply-To: Martijn van Oosterhout References: <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> <20060803204954.GF20080@svana.org> <26292.1154639087@sss.pgh.pa.us> <20060804003720.GF9697@varlena.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2oox5VnwalALFvA7" Content-Disposition: inline In-Reply-To: <20060804003720.GF9697@varlena.com> 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: X-Warning: Normally my messages are signed, but not on the ozTiVo list due to legacy application support 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.192 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200608/227 X-Sequence-Number: 87720 --2oox5VnwalALFvA7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 03, 2006 at 05:37:21PM -0700, elein wrote: > I can think of histograms as a data type which may take more than one arg= ument, > maybe even an array for boundary information. I think the direction *in = the > long term* should be to allow multiple arguments (as a ROW type?) and oth= er > base or complex types as arguments. The value would be a type itself and > the datatype must do the right thing regarding it. This may not be pract= ical > for short-term, but would open up initialization parameters for user-defi= ned > typed. Two problems: 1. The storage of the type cannot be affected by the typmod, because you're not going to always have it available. 2. It's got to be a single integer (int4 I think) So histograms would have to store the bounds some other way anyway... I think multiple arguments would be cool but we have to keep in mind the limitations of typmod. 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. --2oox5VnwalALFvA7 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) iD8DBQFE01lAIB7bNG8LQkwRArBPAJ9b78nCh+qYdJ6iN7pndT20qgdBnQCgjJUQ SpJPQxuofNbYHGBjZs2cLpU= =Yh5q -----END PGP SIGNATURE----- --2oox5VnwalALFvA7--