GetSchema Triggers amd arguments
Posted: Wed 18 May 2011 06:51
I'm using PgSqlConnection.GetSchema to look at the triggers collection.
It returns name, schema, definer, language, argumentcount,oid etc...
What I need is the table the trigger refers to.
I presume under the covers, the provider is selecting from pg_trigger, like this example: http://www.alberton.info/postgresql_meta_info.html
In which case it's a simple join to pg_class on pg_trigger.tgrelid = pg_class.oid to read the relname.
For the time being I'm using a form of the select trigger metadata statement from that webpage directly, which tells me details of before/after insert/delete/update and event.
It would be nice to be able to call GetSchema triggers with that extra information.
There's also a GetSchema arguments collection. This is always empty for me. When I use the example function from the page http://www.alberton.info/postgresql_meta_info.html I can see the function arguments.
It returns name, schema, definer, language, argumentcount,oid etc...
What I need is the table the trigger refers to.
I presume under the covers, the provider is selecting from pg_trigger, like this example: http://www.alberton.info/postgresql_meta_info.html
In which case it's a simple join to pg_class on pg_trigger.tgrelid = pg_class.oid to read the relname.
For the time being I'm using a form of the select trigger metadata statement from that webpage directly, which tells me details of before/after insert/delete/update and event.
It would be nice to be able to call GetSchema triggers with that extra information.
There's also a GetSchema arguments collection. This is always empty for me. When I use the example function from the page http://www.alberton.info/postgresql_meta_info.html I can see the function arguments.