From: Tom Lane <tgl@sss.pgh.pa.us>
To: Guillaume Lelarge <guillaume@lelarge.info>
Cc: Wells Oliver <wellsoliver@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Dump/restore casts
Date: Mon, 16 May 2011 10:33:09 -0400
Message-ID: <15453.1305556389@sss.pgh.pa.us> (raw)
In-Reply-To: <4DD0E83D.2050805@lelarge.info>
References: <BANLkTi=zbWZkJf8HZEGHnF-pVkKHyBmv+g@mail.gmail.com>
<4DD0E83D.2050805@lelarge.info>
Guillaume Lelarge <guillaume@lelarge.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, guillaume@lelarge.info, wellsoliver@gmail.com
Subject: Re: Dump/restore casts
In-Reply-To: <15453.1305556389@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox