pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Dump/restore casts
3+ messages / 3 participants
[nested] [flat]

* Dump/restore casts
@ 2011-05-12 01:52 Wells Oliver <wellsoliver@gmail.com>
  2011-05-16 09:02 ` Re: Dump/restore casts Guillaume Lelarge <guillaume@lelarge.info>
  0 siblings, 1 reply; 3+ messages in thread

From: Wells Oliver @ 2011-05-12 01:52 UTC (permalink / raw)
  To: pgsql-admin

If I'm understanding things, pg_dump will not dump casts b/c they are system
objects and belong to neither schema nor database. OK- kind of frustrating-
but OK. Is there, then, any way to easily dump all casts on a server so that
they can easily be copied and recreated in a restoration process?

Thanks.

-- 
Wells Oliver
wellsoliver@gmail.com

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Dump/restore casts
  2011-05-12 01:52 Dump/restore casts Wells Oliver <wellsoliver@gmail.com>
@ 2011-05-16 09:02 ` Guillaume Lelarge <guillaume@lelarge.info>
  2011-05-16 14:33   ` Re: Dump/restore casts Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Guillaume Lelarge @ 2011-05-16 09:02 UTC (permalink / raw)
  To: Wells Oliver <wellsoliver@gmail.com>; +Cc: pgsql-admin

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.


-- 
Guillaume
 http://www.postgresql.fr
 http://dalibo.com



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Dump/restore casts
  2011-05-12 01:52 Dump/restore casts Wells Oliver <wellsoliver@gmail.com>
  2011-05-16 09:02 ` Re: Dump/restore casts Guillaume Lelarge <guillaume@lelarge.info>
@ 2011-05-16 14:33   ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2011-05-16 14:33 UTC (permalink / raw)
  To: Guillaume Lelarge <guillaume@lelarge.info>; +Cc: Wells Oliver <wellsoliver@gmail.com>; pgsql-admin

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2011-05-16 14:33 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-05-12 01:52 Dump/restore casts Wells Oliver <wellsoliver@gmail.com>
2011-05-16 09:02 ` Guillaume Lelarge <guillaume@lelarge.info>
2011-05-16 14:33   ` Tom Lane <tgl@sss.pgh.pa.us>

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