pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: pgsql-hackers@postgresql.org
Subject: Re: pg_dump vs. TRANSFORMs
Date: Thu, 5 May 2016 08:28:27 -0400
Message-ID: <376f5fb1-85cb-6b4c-9927-645b5e209456@2ndquadrant.com> (raw)
In-Reply-To: <15548.1462418615@sss.pgh.pa.us>
References: <20160504183952.GE10850@tamriel.snowman.net>
	<0a288671-29ec-ecdd-d8ae-e0f5c73dcc8d@2ndquadrant.com>
	<15548.1462418615@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 5/4/16 11:23 PM, Tom Lane wrote:
> 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.

Hmm.  The way I understand it is that Stephen wants to make dumping that 
test case work.  But note that that test case is bogus; it wouldn't 
actually do anything useful in practice.  There aren't any functions in 
the system catalog that could be used for actual transforms.  So making 
these changes in pg_dump isn't really of much practical value.  Perhaps 
it would be easier to change the test case or adjust the testing procedure?

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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



view thread (21+ messages)  latest in thread

Message-ID: <376f5fb1-85cb-6b4c-9927-645b5e209456@2ndquadrant.com>
Permalink:  ../376f5fb1-85cb-6b4c-9927-645b5e209456@2ndquadrant.com/
Also on:    postgresql.org/message-id/376f5fb1-85cb-6b4c-9927-645b5e209456@2ndquadrant.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, tgl@sss.pgh.pa.us, sfrost@snowman.net
  Subject: Re: pg_dump vs. TRANSFORMs
  In-Reply-To: <376f5fb1-85cb-6b4c-9927-645b5e209456@2ndquadrant.com>

* 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