]> granicus.if.org Git - postgresql/commit
Fix dumping of casts and transforms using built-in functions
authorStephen Frost <sfrost@snowman.net>
Wed, 21 Dec 2016 18:47:13 +0000 (13:47 -0500)
committerStephen Frost <sfrost@snowman.net>
Wed, 21 Dec 2016 18:47:13 +0000 (13:47 -0500)
commit542975a147525caa659ac08220b81c32a60f0a5c
tree8268184861c3d721981da48179394b28342a7ee6
parente45319bb7796e3ab8095da329a1f73d22aaa57c4
Fix dumping of casts and transforms using built-in functions

In pg_dump.c dumpCast() and dumpTransform(), we would happily ignore the
cast or transform if it happened to use a built-in function because we
weren't including the information about built-in functions when querying
pg_proc from getFuncs().

Modify the query in getFuncs() to also gather information about
functions which are used by user-defined casts and transforms (where
"user-defined" means "has an OID >= FirstNormalObjectId").  This also
adds to the TAP regression tests for 9.6 and master to cover these
types of objects.

Back-patch all the way for casts, back to 9.5 for transforms.

Discussion: https://www.postgresql.org/message-id/flat/20160504183952.GE10850%40tamriel.snowman.net
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/t/002_pg_dump.pl