From: | hubert depesz lubaczewski <depesz(at)gmail(dot)com> |
---|---|
To: | "Vasudevan, Ramya" <ramya(dot)vasudevan(at)classmates(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: event triggers in 9.3.4 |
Date: | 2014-07-25 14:43:22 |
Message-ID: | CAKrjmheGtKQJ5tGPxj5i_y17bD0Xp6O_9yvuubBbCegsZMqnnQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Jul 24, 2014 at 7:13 PM, Vasudevan, Ramya <
ramya(dot)vasudevan(at)classmates(dot)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:
> http://www.depesz.com/2013/12/18/waiting-for-9-4-plperl-add-event-trigger-support/
>
> Thank You Depesz. This will work for ‘CREATE’ and ‘DROP’ DDLs.
>
>
>
> But, what about the scenario where I want to just have event triggers for
> operations like these? - 'ALTER TABLE','ALTER TRIGGER', 'ALTER FUNCTION'
>
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.
depesz
From | Date | Subject | |
---|---|---|---|
Next Message | Sergiy Zuban | 2014-07-25 15:51:02 | Re: postgres_fdw - push down conditionals for ENUMs |
Previous Message | Ramesh T | 2014-07-25 05:52:19 | Re: tab_to_sting |