Re: [GENERAL] A real currency type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] A real currency type
Date: 2006-03-21 22:25:15
Message-ID: 3209.1142979915@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Martijn van Oosterhout <kleptog(at)svana(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jerry LeVan 2006-03-21 22:38:59 Re: Postgresql won't run after upgrade to fc5
Previous Message Martijn van Oosterhout 2006-03-21 22:23:59 Re: [GENERAL] A real currency type

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-03-21 22:28:23 Re: Automatically setting work_mem
Previous Message Martijn van Oosterhout 2006-03-21 22:23:59 Re: [GENERAL] A real currency type