Hello
2014-07-25 20:46 GMT+02:00 Alvaro Herrera alvhe...@2ndquadrant.com:
Pavel Stehule wrote:
Hello
I found a interesting extension
http://code.malloclabs.com/pg_schema_triggers
Ah, I remember that. I find that approach more cumbersome to use than
mine. Note the ALTER cases can't
On Thu, Jul 24, 2014 at 7:13 PM, Vasudevan, Ramya
ramya.vasude...@classmates.com wrote:
You could compare list of tables before (_start) and after (_end) the
ddl. Doing it in plpgsql will be tricky, but if you'd use some other
language - like plperl - it's relatively simple:
Sure - just check differences in appropriate catalogs. pg_attribute,
pg_trigger, pg_proc.
In any way - if you want to really use it - you'll have to write in C.
Thank You Depesz. I think that answered my question.
Thank You
Ramya
Vasudevan, Ramya wrote:
You could compare list of tables before (_start) and after (_end) the ddl.
Doing it in plpgsql will be tricky, but if you'd use some other language -
like plperl - it's relatively simple:
Hello
I found a interesting extension
http://code.malloclabs.com/pg_schema_triggers
Regards
Pavel
2014-07-25 20:01 GMT+02:00 Alvaro Herrera alvhe...@2ndquadrant.com:
Vasudevan, Ramya wrote:
You could compare list of tables before (_start) and after (_end) the
ddl. Doing it in plpgsql
Pavel Stehule wrote:
Hello
I found a interesting extension
http://code.malloclabs.com/pg_schema_triggers
Ah, I remember that. I find that approach more cumbersome to use than
mine. Note the ALTER cases can't tell you much about exactly how the
relation has changed; you have to run
On Thu, Jul 24, 2014 at 2:22 AM, Vasudevan, Ramya
ramya.vasude...@classmates.com wrote:
CREATE TABLE log_ddl_info(ddl_tag text, ddl_event text, ddl_time
timestamp);
CREATE OR REPLACE FUNCTION log_ddl_execution()
RETURNS event_trigger AS $$
DECLARE
insertquery TEXT;
BEGIN
You could compare list of tables before (_start) and after (_end) the ddl.
Doing it in plpgsql will be tricky, but if you'd use some other language -
like plperl - it's relatively simple:
http://www.depesz.com/2013/12/18/waiting-for-9-4-plperl-add-event-trigger-support/
Thank You Depesz.
I set up the following to log all DDLs executed in the database:
CREATE TABLE log_ddl_info(ddl_tag text, ddl_event text, ddl_time timestamp);
CREATE OR REPLACE FUNCTION log_ddl_execution()
RETURNS event_trigger AS $$
DECLARE
insertquery TEXT;
BEGIN
insertquery := 'INSERT INTO log_ddl_info
On 07/23/2014 05:22 PM, Vasudevan, Ramya wrote:
I set up the following to log all DDLs executed in the database:
CREATE TABLE log_ddl_info(ddl_tag text, ddl_event text, ddl_time timestamp);
CREATE OR REPLACE FUNCTION log_ddl_execution()
RETURNS event_trigger AS $$
DECLARE
insertquery TEXT;
10 matches
Mail list logo