pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix dumping of casts and transforms using built-in functions
Date: Wed, 21 Dec 2016 18:47:47 +0000
Message-ID: <E1cJlvX-0001rl-MT@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

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

Branch
------
REL9_6_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/542975a147525caa659ac08220b81c32a60f0a5c

Modified Files
--------------
src/bin/pg_dump/pg_dump.c        | 46 +++++++++++++++++-----
src/bin/pg_dump/t/002_pg_dump.pl | 82 +++++++++++++++++++++++++---------------
2 files changed, 88 insertions(+), 40 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (6+ messages)

Message-ID: <E1cJlvX-0001rl-MT@gemulon.postgresql.org>
Permalink:  ../E1cJlvX-0001rl-MT@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1cJlvX-0001rl-MT@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: sfrost@snowman.net
  Subject: Re: pgsql: Fix dumping of casts and transforms using built-in functions
  In-Reply-To: <E1cJlvX-0001rl-MT@gemulon.postgresql.org>
  References: <E1cJlvX-0001rl-MT@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox