X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id B81849DC809 for ; Tue, 21 Mar 2006 18:55:10 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 82071-03 for ; Tue, 21 Mar 2006 18:55:12 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 92C909DCC19 for ; Tue, 21 Mar 2006 18:55:07 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k2LMt9oq004731; Tue, 21 Mar 2006 17:55:09 -0500 (EST) To: Martijn van Oosterhout cc: Bruce Momjian , PostgreSQL-development Subject: Re: [GENERAL] A real currency type In-reply-to: <20060321224422.GK11045@svana.org> References: <20050828170727.GC12498@svana.org> <200603211349.k2LDnIR15871@candle.pha.pa.us> <20060321142710.GD11045@svana.org> <29420.1142975421@sss.pgh.pa.us> <20060321221212.GH11045@svana.org> <3209.1142979915@sss.pgh.pa.us> <20060321224422.GK11045@svana.org> Comments: In-reply-to Martijn van Oosterhout message dated "Tue, 21 Mar 2006 23:44:22 +0100" Date: Tue, 21 Mar 2006 17:55:09 -0500 Message-ID: <4730.1142981709@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.113 required=5 tests=[AWL=0.113] X-Spam-Score: 0.113 X-Spam-Level: X-Archive-Number: 200603/900 X-Sequence-Number: 81298 Martijn van Oosterhout writes: > Let me put it this way: if this is to progress beyond just a contrib > module, it needs to go all the way (special syntax, pg_dump, etc). I'm > not sure if I'm that enamoured with it to want all that. My feelings in a nutshell ;-) > The only way to avoid that is if both the type and the backing table > are included in the standard distribution and we forbid user changes. I was thinking something more like a CREATE ENUM TYPE command that specifically lists the enum values, and some extension of that to cater for tagged types, and the values are put into a system catalog that the user doesn't manipulate directly. I don't see why it's a good idea to put control of the backing table in the user's hands. Yes, you can think of advanced applications where it's useful to have random additional stuff in the table, but that's exactly the point at which you normally have to get down-and-dirty with some C code --- after all, what is standardized code going to *do* with the additional stuff? Nothing, that's what. If the argument for this is to make it simple to make simple enum and tagged types, then I don't think that the design should be centered on allowing extra stuff. regards, tom lane