Re: replicating DROP commands across servers
От | Alvaro Herrera |
---|---|
Тема | Re: replicating DROP commands across servers |
Дата | |
Msg-id | 20141003180633.GE7043@eldon.alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: replicating DROP commands across servers (Heikki Linnakangas <hlinnakangas@vmware.com>) |
Ответы |
Re: replicating DROP commands across servers
|
Список | pgsql-hackers |
Heikki Linnakangas wrote: > I had a very brief look at the docs, and these extra outputs from > pg_event_trigger_dropped_objects caught my eye: > > >+ <row> > >+ <entry><literal>address_names</literal></entry> > >+ <entry><type>text[]</type></entry> > >+ <entry> > >+ An array that, together with <literal>address_args</literal>, > >+ can be used by the C-language function getObjectAddress() to > >+ recreate the object address in a remote server containing a similar object. > >+ </entry> > >+ </row> > >+ <row> > >+ <entry><literal>address_args</literal></entry> > >+ <entry><type>text[]</type></entry> > >+ <entry> > >+ See <literal>address_names</literal> above. > >+ </entry> > >+ </row> > > I couldn't find a function called getObjectAddress anywhere. Typo? Ah, yeah, it's get_object_address actually. > Also, is providing a C-language function the best we can do? The > rest of the information returned by pg_event_trigger_dropped_objects > is usable from any language. Well, the return value from get_object_address is an ObjectAddress. It's simple enough to create an SQL wrapper that takes the address_names/address_args arrays and return an ObjectAddress; would this be useful? -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: