Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cF0Nc-0007WM-2H for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Dec 2016 15:13:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cF0Nb-0005jw-MI for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Dec 2016 15:13:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cF0Na-0005j3-HM for pgsql-hackers@postgresql.org; Thu, 08 Dec 2016 15:13:02 +0000 Received: from tamriel.snowman.net ([72.66.115.51]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cF0NV-00056Q-Vs for pgsql-hackers@postgresql.org; Thu, 08 Dec 2016 15:13:01 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 284385F7AA; Thu, 8 Dec 2016 10:11:57 -0500 (EST) Date: Thu, 8 Dec 2016 10:11:57 -0500 From: Stephen Frost To: Tom Lane Cc: pgsql-hackers@postgresql.org Subject: Re: pg_dump vs. TRANSFORMs Message-ID: <20161208151156.GD23417@tamriel.snowman.net> References: <20160504183952.GE10850@tamriel.snowman.net> <20161207200915.GZ23417@tamriel.snowman.net> <729.1481151371@sss.pgh.pa.us> <20161208142116.GC23417@tamriel.snowman.net> <4955.1481209396@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="je2i5r69C8+2chMc" Content-Disposition: inline In-Reply-To: <4955.1481209396@sss.pgh.pa.us> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-91-generic (x86_64) X-Uptime: 10:07:31 up 152 days, 16:31, 30 users, load average: 0.25, 0.20, 0.16 User-Agent: Mutt/1.5.21 (2010-09-15) 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 --je2i5r69C8+2chMc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Tom, * Tom Lane (tgl@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > * Tom Lane (tgl@sss.pgh.pa.us) wrote: > >> I have a vague feeling that the code for dumping casts and/or transfor= ms > >> may have some assumptions that the underlying function is also being > >> dumped. Although maybe the assumption was really only what's fixed he= re, > >> ie that there be a DumpableObject for the function. Anyway, take a cl= ose > >> look for that. >=20 > > I'll look around and see, though my hunch is that, at some point, we > > were just pulling all functions and then an optimization was added to > > exclude pg_catalog and no one noticed that it broke casts using built-in > > functions. >=20 > Nah, that's historical revisionism --- the exclusion for system functions > is very ancient. It certainly predates transforms altogether, and > probably predates the cast-dumping code in anything like its current form. Oh, certainly it predates transforms entirely, but I completely expect that code to have been copied from dumpCast(). > I think the expectation was that casts using built-in functions were > also built-in and so needn't be dumped. There may be a comment about it > somewhere, which would need to be revised now. I'll look and see. > (Actually, the most likely way in which this would break things is if > it started causing built-in casts to get dumped ... have you checked?) I did and it doesn't cause built-in casts to be dumped because we have the FirstNormalObjectId check in selectDumpableCast(). We don't have that for transforms (it just uses the generic selectDumpableObject routine), but we also don't have any built-in transforms. Thanks! Stephen --je2i5r69C8+2chMc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJYSXg8AAoJEO1sijiDR2RVO9sQALV3NfqlX21KIHa0uyp/xKGx pW179PCxeQtwUQTeuNLi1btUzzdMdWYUnnsE24lzr0DsTl9gDzzkRsCYJdLMMGWz dQ6YKO9AV2S/1Z4LAUS2EIBSdnaclSOIAFXkaKx3HG8ua8lOZYq9/OYaU9hSZ1SU kjPKMLAsOhF0ZHhWQSYwGI3YENzhenY1Kb2YbbTOZgGpWKpWex5//WiCbwjLxM7a bW8AeDV1zNiKadwkxhspGLwPnI0vbVd0HyKjA622QyYtBsIVm77zz47ojI/GMptb 1N5jvk+pgLL7sxWoYbYL3kOektFAA+92T9efGsbH0KEnyl2IsaJKWNIqxwQUdS0G zHqqKtqznhWMqyDahexoyt0eBKcgg2DNiqWmlJr+dWnJ0mQUixmR01/E3kv/uFa0 N4tDIsxRQ58JHtt7UBQ9Sp33OZw/JM3+juuupH1X07DlfSM4zCGpaGg7zQD87M68 1sD2KMib4CpV6r+czAv/KEI8zAx6EowCg4kAhxq/RVw20PD9UH0z/UaHgs4zQba/ 3DUR7+8pB2r16DYZ//9P/qem50VyqC/av3L8+vmrZgyNeNRdpeo+N0klQnDcvAGr 7g8zkMwG08lJnfXFyaGodQLp+NDs3Lrx6FG5m0NpfjaOVgZpw+tb4mmrKI1/JXdh w/d0/KjGPSXGm17Q4qcn =/A9Y -----END PGP SIGNATURE----- --je2i5r69C8+2chMc--