Re: [HACKERS] References to arbitrary database objects that aresuitable for pg_dump
От | Jim Nasby |
---|---|
Тема | Re: [HACKERS] References to arbitrary database objects that aresuitable for pg_dump |
Дата | |
Msg-id | bc889610-5571-78d3-e4c5-f9e36141fac0@BlueTreble.com обсуждение исходный текст |
Ответ на | Re: References to arbitrary database objects that are suitable for pg_dump (Jim Nasby <Jim.Nasby@BlueTreble.com>) |
Ответы |
Re: [HACKERS] References to arbitrary database objects that aresuitable for pg_dump
|
Список | pgsql-hackers |
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)
В списке pgsql-hackers по дате отправления: