Skip site navigation (1) Skip section navigation (2)

Re: problem with casts dump/restore

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Jan Wieck <JanWieck(at)Yahoo(dot)com>
Subject: Re: problem with casts dump/restore
Date: 2005-01-11 18:53:37
Message-ID: 3093.1105469617@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgadmin-hackerspgsql-hackers
"Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)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 the two data types) are not
     * builtin AND if all of the non-builtin objects namespaces are
     * included in the dump. Builtin meaning, 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

In response to

pgsql-hackers by date

Next:From: Merlin MoncureDate: 2005-01-11 19:09:45
Subject: Re: problem with casts dump/restore
Previous:From: Elein MustainDate: 2005-01-11 18:33:44
Subject: Re: IBM releases 500 patents

pgadmin-hackers by date

Next:From: John HansenDate: 2005-01-11 20:48:28
Subject: Re: [HACKERS] problem with casts dump/restore
Previous:From: Merlin MoncureDate: 2005-01-11 17:11:02
Subject: problem with casts dump/restore

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group