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:25:15 -0500
Message-ID: <3209.1142979915@sss.pgh.pa.us> (raw)
In-Reply-To: <20060321221212.GH11045@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>

Martijn van Oosterhout <kleptog@svana.org> writes:
> Really? The code creates ordinary types, operators and functions, all
> of which are dumped fine by pg_dump. Dependancies are created which
> should ensure the parts get dumped in the right order. What special
> support in pg_dump were you envisioning?

The dump should look the same as the commands originally used to create
the type, which is surely not going to happen with that "SELECT
create_tagged_type()" stuff barring pg_dump modifications.  Otherwise
we are nailing down not one but two representations of this feature that
we'll have to support forevermore: what the users see and what's in
pg_dump scripts.  We've already learned that lesson the hard way several
times, and are still trying to cope with the fallout in some places
(serial columns for instance).

Now I happen to think that SELECT create_tagged_type() is a horrid kluge
anyway ;-) so I'm not proposing that pg_dump be changed to output that.
What we would need is to design a command syntax that we're actually
prepared to live with for the indefinite future, then implement it in
the backend and teach pg_dump about it.

What we *don't* want is a pg_dump representation that exposes
implementation details.  I would classify both the backing table for a
tagged type's enum values, and the representation of its operators and
functions, as implementation details.

BTW, I share Andrew Dunstan's feeling that there's huge overlap here
with support for mysql-like enum types.  We ought to try to kill that
bird with the same stone.

			regards, tom lane



view thread (23+ messages)  latest in thread

Message-ID: <3209.1142979915@sss.pgh.pa.us>
Permalink:  ../3209.1142979915@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3209.1142979915@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: <3209.1142979915@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>

* 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