pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Martijn van Oosterhout <kleptog@svana.org>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [GENERAL] A real currency type
Date: Tue, 21 Mar 2006 17:55:09 -0500
Message-ID: <4730.1142981709@sss.pgh.pa.us> (raw)
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>

Martijn van Oosterhout <kleptog@svana.org> 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



view thread (23+ messages)  latest in thread

Message-ID: <4730.1142981709@sss.pgh.pa.us>
Permalink:  ../4730.1142981709@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4730.1142981709@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, kleptog@svana.org, pgman@candle.pha.pa.us, pgsql-hackers@postgresql.org
  Subject: Re: [GENERAL] A real currency type
  In-Reply-To: <4730.1142981709@sss.pgh.pa.us>
  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> <4730.1142981709@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox