pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-general@postgresql.org
Subject: How to extract information from pg_ddl_command type
Date: Thu, 11 Jul 2019 09:27:11 +0200
Message-ID: <qg6ocf$ikd$1@blaine.gmane.org> (raw)

The function pg_event_trigger_ddl_commands() returns several columns, one of them being "command" that is of the type "pg_ddl_command". 

The manual[1] describes this column as: 

> A complete representation of the command, in internal format. 
> This cannot be output directly, but it can be passed to other 
> functions to obtain different pieces of information about the 
> command.

However, I can not find any of those "other functions" to extract information from that column. 

My goal is to get the complete SQL text that fired the event trigger - is that even possible through pg_event_trigger_ddl_commands()? 

Thanks
Thomas

[1] https://www.postgresql.org/docs/current/functions-event-triggers.html






view thread (2+ messages)  latest in thread

Message-ID: <qg6ocf$ikd$1@blaine.gmane.org>
Permalink:  ../qg6ocf$ikd$1@blaine.gmane.org/
Also on:    postgresql.org/message-id/qg6ocf$ikd$1@blaine.gmane.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: spam_eater@gmx.net
  Subject: Re: How to extract information from pg_ddl_command type
  In-Reply-To: <qg6ocf$ikd$1@blaine.gmane.org>
  References: <qg6ocf$ikd$1@blaine.gmane.org>

* 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