FAQ
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

Search Discussions

  • Guillaume Lelarge at May 16, 2011 at 9:03 am

    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.
  • Tom Lane at May 16, 2011 at 2:33 pm

    Guillaume Lelarge 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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-admin @
categoriespostgresql
postedMay 12, '11 at 1:52a
activeMay 16, '11 at 2:33p
posts3
users3
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2021 Grokbase