Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cEl8K-0006GQ-Fa for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Dec 2016 22:56:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cEl8J-00018D-LP for pgsql-hackers@arkaria.postgresql.org; Wed, 07 Dec 2016 22:56:15 +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 1cEl8I-000186-Vx for pgsql-hackers@postgresql.org; Wed, 07 Dec 2016 22:56:15 +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 1cEl8G-00037b-KI for pgsql-hackers@postgresql.org; Wed, 07 Dec 2016 22:56:13 +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 uB7MuBbn000730; Wed, 7 Dec 2016 17:56:11 -0500 From: Tom Lane To: Stephen Frost cc: pgsql-hackers@postgresql.org Subject: Re: pg_dump vs. TRANSFORMs In-reply-to: <20161207200915.GZ23417@tamriel.snowman.net> References: <20160504183952.GE10850@tamriel.snowman.net> <20161207200915.GZ23417@tamriel.snowman.net> Comments: In-reply-to Stephen Frost message dated "Wed, 07 Dec 2016 15:09:15 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <728.1481151371.1@sss.pgh.pa.us> Date: Wed, 07 Dec 2016 17:56:11 -0500 Message-ID: <729.1481151371@sss.pgh.pa.us> X-Pg-Spam-Score: -4.9 (----) 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 Stephen Frost writes: > As pointed out by Peter E, this also impacts CASTs. Attached is a patch > which addresses both by simply also pulling any functions which are > referenced from pg_cast or pg_transform when they have OIDs at or after > FirstNormalObjectId. I also modified dumpCast() and dumpTransform() to > complain loudly if they're unable to dump out the cast or transform due > to not finding the function definition(s) necessary. Please do not hack the already-overcomplicated query in getFuncs without bothering to adjust the long comment that describes what it's doing. I have a vague feeling that the code for dumping casts and/or transforms may have some assumptions that the underlying function is also being dumped. Although maybe the assumption was really only what's fixed here, ie that there be a DumpableObject for the function. Anyway, take a close look for that. Looks reasonable otherwise. 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