On 11/26/16 12:30 AM, Jim Nasby wrote:
On 11/25/16 6:00 PM, Tom Lane wrote:
OIDs?  Then use pg_describe_object() to turn that into text when dumping.

How would I get pg_dump to do that?

I could certainly make this work if there was some way to customize how
pg_dump dumps things, but AFAIK there's no way to do that, even with
extensions.

Is there anything that will translate an object identity (as returned by pg_event_trigger_ddl_commands) into class/object/subobject OIDs? If I had that, I could use it to track objects by OID (like pg_depend does), as well as storing the text representation. That way I can have an event trigger that updates the stored pg_describe_object() text any time an object was renamed. Without that, I don't see any good way to find the original name of a renamed object (so that I can update my reference to it).

ISTM it would be useful to add address_names and address_args to pg_event_trigger_ddl_commands(), as well as adding some way to get the original information for an object when an ALTER is being done. In particular, if something (such as a column) is being renamed.

BTW, why were pg_get_object_address and pg_identify_object_as_address added instead of creating a function that accepted the output of pg_identify_object()? Is there a reason that wouldn't work?
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)


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

Reply via email to