Re: pgsql-server/src/bin/pg_dump pg_backup_archiver.c

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Hiroshi Inoue <inoue(at)postgresql(dot)org>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql-server/src/bin/pg_dump pg_backup_archiver.c
Date: 2003-01-05 22:53:00
Message-ID: 14435.1041807180@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> I'm not completely sure what the "lo" type provides, but if there was a
> cast between oid and lo in 7.2 (by having an appropriately named
> function), then pg_dump 7.3 should create the appropriate CREATE CAST
> statements for restore into a 7.3 database. Maybe pg_dump is missing this
> for some reason?

I tried installing 7.2's contrib/lo and then running current pg_dump.
I see:

CREATE FUNCTION oid (lo) RETURNS oid
AS '$libdir/lo', 'lo_oid'
LANGUAGE "C";

CREATE CAST (lo AS oid) WITH FUNCTION oid (lo);

CREATE FUNCTION lo (oid) RETURNS lo
AS '$libdir/lo', 'lo'
LANGUAGE "C";

CREATE CAST (oid AS lo) WITH FUNCTION lo (oid);

The trouble with this is that the CREATE CASTs will fail because of the
prohibition against volatile cast functions.

I'm still of the opinion that that prohibition is inappropriate and
useless. I'd vote for removing it.

regards, tom lane

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2003-01-06 00:31:45 pgsql-server/ oc/src/sgml/ref/alter_domain.sgm ...
Previous Message Tom Lane 2003-01-05 21:51:36 Re: pgsql-server/ /configure /configure.in rc/Make ...