Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay9tB-0000m1-Ey for pgsql-hackers@arkaria.postgresql.org; Thu, 05 May 2016 03:23:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ay9tA-0007sO-Ds for pgsql-hackers@arkaria.postgresql.org; Thu, 05 May 2016 03:23:44 +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_2) (envelope-from ) id 1ay9t9-0007s8-LF for pgsql-hackers@postgresql.org; Thu, 05 May 2016 03:23:43 +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_2) (envelope-from ) id 1ay9t2-0000E2-TS for pgsql-hackers@postgresql.org; Thu, 05 May 2016 03:23:42 +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 u453NZNh015549; Wed, 4 May 2016 23:23:35 -0400 From: Tom Lane To: Peter Eisentraut cc: Stephen Frost , pgsql-hackers@postgresql.org Subject: Re: pg_dump vs. TRANSFORMs In-reply-to: <0a288671-29ec-ecdd-d8ae-e0f5c73dcc8d@2ndquadrant.com> References: <20160504183952.GE10850@tamriel.snowman.net> <0a288671-29ec-ecdd-d8ae-e0f5c73dcc8d@2ndquadrant.com> Comments: In-reply-to Peter Eisentraut message dated "Wed, 04 May 2016 16:56:05 -0400" Date: Wed, 04 May 2016 23:23:35 -0400 Message-ID: <15548.1462418615@sss.pgh.pa.us> X-Pg-Spam-Score: -4.0 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Peter Eisentraut writes: > On 5/4/16 2:39 PM, Stephen Frost wrote: >> These checks are looking for the functions used by the transform in the >> list of functions that pg_dump has loaded, but in 9.5, we don't load any >> of the function in pg_catalog, and even with my patches, we only dump >> the functions in pg_catalog that have an ACL which has been changed from >> the default. > This issue is not specific to transforms. For example, if you create a > user-defined cast using a built-in function, the cast won't be dumped. > Obviously, this is a problem, but it needs a more general solution. Actually, I believe it will be dumped. selectDumpableCast believes it should dump casts with OID >= FirstNormalObjectId. That's a kluge no doubt, but reasonably effective; looks like we've been doing that since 9.0. pg_dump appears not to have a special-case selectDumpableTransform routine. Instead it falls back on the generic selectDumpableObject for transforms. That's a bad idea because the only useful bit of knowledge selectDumpableObject has is to look at the containing namespace ... and transforms don't have one, just as casts don't. My recommendation is to clone that cast logic for transforms. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers