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

From Tom Lane
Subject Re: pgsql-server/src/bin/pg_dump pg_backup_archiver.c
Date
Msg-id 14435.1041807180@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql-server/src/bin/pg_dump pg_backup_archiver.c  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-committers
Peter Eisentraut <peter_e@gmx.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

pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql-server/ /configure /configure.in rc/Make ...
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql-server/ oc/src/sgml/ref/alter_domain.sgm ...