Search Postgresql Archives

Way to get at parsed trigger 'WHEN' clause expression?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Folks,

	I see that psql's \d displays trigger information of a table by making a call to pg_catalog.pg_get_triggerdef(), which abstracts away most all need to parse the contents of system catalog pg_trigger. However, we'd like to be able to get at a human readable representation of just the WHEN clause of the trigger expression. Function pg_get_expr() looked likely, but fails when fed a pgqual value from pg_trigger ala:

	ERROR: bogus varno: 2 

	I suspect that it is falling over dead trying to parse the representation of NEW and / or OLD. Anything built in, or should we just make call to pg_catalog.pg_get_triggerdef() and parse out the WHEN clause text?

Thanks!
------
James Robinson
Socialserve.com by Emphasys Software





-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux