Pavel Stehule escribió:

> 2014-02-17 18:10 GMT+01:00 Alvaro Herrera <>:

> > Maybe I am mistaken and the te->dropStmt already contains the IF EXISTS
> > bit for some reason; but if so I don't know why that is.  Care to
> > explain?
> pg_restore is available to read plain dump produced by pg_dump --if-exists.
> It is way how IF EXISTS can infect te->dropStmt

Makes sense, I guess.

> > I also think that _getObjectDescription() becomes overworked after this
> > patch.  I wonder if we should be storing te->objIdentity so that we can
> > construct the ALTER OWNER command without going to as much trouble as
> > parsing the DROP command.  Is there a way to do that? Maybe we can ask
> > the server for the object identity, for example.  There is a new
> > function to do that in 9.3 which perhaps we can now use.
> do you think a pg_describe_object function?
> Probably it is possible, but its significantly much more invasive change,
> you should to get objidentity, that is not trivial

I was thinking in pg_identify_object().  It can be given the values used
to construct the CatalogId of each tocEntry.

But yes, it is more invasive.

I'd guess that would be a project related to cleaning up the ALTER
OWNER.  What we have now looks like an kludge.

Álvaro Herrera      
PostgreSQL Development, 24x7 Support, Training & Services

Sent via pgsql-hackers mailing list (
To make changes to your subscription:

Reply via email to