Re: Dump/restore casts

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: Wells Oliver <wellsoliver(at)gmail(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Dump/restore casts
Date: 2011-05-16 14:33:09
Message-ID: 15453.1305556389@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Guillaume Lelarge <guillaume(at)lelarge(dot)info> writes:
> Le 05/12/2011 03:52 AM, Wells Oliver a crit :
>> If I'm understanding things, pg_dump will not dump casts b/c they are system
>> objects and belong to neither schema nor database.

> It doesn't dump system casts because they are system objects, and so
> always available. But it does dump user casts.

Of course the trick is to tell which is which. According to the pg_dump
code the current rule is

* 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 are included in the dump.
* Builtin meaning, the namespace name does not start with "pg_".

Possibly Oliver is falling foul of that rule somehow --- it's certainly
not perfect, especially in a partial dump scenario.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Lou Picciano 2011-05-16 17:56:47 Session handshaking: 'Incomplete startup packets' message
Previous Message Guillaume Lelarge 2011-05-16 09:02:53 Re: Dump/restore casts