Re: problem with casts dump/restore - Mailing list pgsql-hackers

From Tom Lane
Subject Re: problem with casts dump/restore
Date
Msg-id 3093.1105469617@sss.pgh.pa.us
Whole thread Raw
In response to problem with casts dump/restore  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
List pgsql-hackers
"Merlin Moncure" <merlin.moncure@rcsonline.com> writes:
> I just noticed that pg_dump does not seem to be exporting at least one
> of my user defined casts...In particular, this one:

> CREATE CAST (xid AS oid)
>   WITHOUT FUNCTION;

This is per design, more or less:
   /*    * As per discussion we dump casts if one or more of the underlying    * objects (the conversion function and
thetwo data types) are not    * builtin AND if all of the non-builtin objects namespaces are    * included in the dump.
Builtinmeaning, the namespace name does not    * start with "pg_".    */
 

(The discussion in question is from late Sept 2003.)

The problem is basically that there's no way to detect that this isn't a
built-in cast.

In 7.3 and later there is another way to attack that question, which is
to look to see if there's a "pin" dependency in pg_depend for the cast.
Kinda ugly but it might do.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: RC5 Bundled ...
Next
From: "Merlin Moncure"
Date:
Subject: Re: problem with casts dump/restore