pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Felix Ostmann <felix.ostmann@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: pg_dump ignore CASTs when using --schema
Date: Fri, 04 Mar 2016 13:23:25 -0500
Message-ID: <29576.1457115805@sss.pgh.pa.us> (raw)
In-Reply-To: <CADxtucYjzcW5UyvfxG7HKy_1yVLnfjyA9fMBikb2xRzvsvT8fg@mail.gmail.com>
References: <CADxtucYjzcW5UyvfxG7HKy_1yVLnfjyA9fMBikb2xRzvsvT8fg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Felix Ostmann <felix.ostmann@gmail.com> writes:
> we have a problem with pg_dump and CAST.

Casts don't have names, therefore they don't have schemas, therefore
a dump that is restricted to a particular schema won't select them.
So this isn't a bug; it's operating as designed.

This is kind of unfortunate in many scenarios, but it's hard to see a
principled way around it.  You might propose something like pretending
that a cast is in the same schema as its implementation function, but
what about casts that have no implementation function?  Likewise,
tying it to the schema of either the input or the output datatype
seems arbitrary and about as likely to be wrong as right.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (3+ messages)  latest in thread

Message-ID: <29576.1457115805@sss.pgh.pa.us>
Permalink:  ../29576.1457115805@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29576.1457115805@sss.pgh.pa.us

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, felix.ostmann@gmail.com
  Subject: Re: pg_dump ignore CASTs when using --schema
  In-Reply-To: <29576.1457115805@sss.pgh.pa.us>
  References: <CADxtucYjzcW5UyvfxG7HKy_1yVLnfjyA9fMBikb2xRzvsvT8fg@mail.gmail.com> <29576.1457115805@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