Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1abuOY-0006ij-3f for pgsql-bugs@arkaria.postgresql.org; Fri, 04 Mar 2016 18:24:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1abuOX-0003IG-Ed for pgsql-bugs@arkaria.postgresql.org; Fri, 04 Mar 2016 18:24:09 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1abuNu-0001tB-AC for pgsql-bugs@postgresql.org; Fri, 04 Mar 2016 18:23:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1abuNr-00052A-L9 for pgsql-bugs@postgresql.org; Fri, 04 Mar 2016 18:23:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u24INP2Z029577; Fri, 4 Mar 2016 13:23:25 -0500 From: Tom Lane To: Felix Ostmann cc: pgsql-bugs@postgresql.org Subject: Re: pg_dump ignore CASTs when using --schema In-reply-to: References: Comments: In-reply-to Felix Ostmann message dated "Fri, 04 Mar 2016 07:56:23 +0100" Date: Fri, 04 Mar 2016 13:23:25 -0500 Message-ID: <29576.1457115805@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Felix Ostmann 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