-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trigger_is(): allow testing function arguments #83
Comments
Actually
What about adding these functions to detect the number of argument ?
|
That would be better than nothing. Another option would be to use the trigger definition parsing code I wrote for cat_tools. |
I'll have a look at your function, as your code is under MIT License too it's possible to use it in pgtap, it's better to keep pgtap with less dependencies as possible. |
Jesus, trigger parsing code? In PL/pgSQL? o_O |
Well, I wanted it to be portable... It's not quite as bad as you might If we didn't care about portable then I think the best way to handle |
I'm sure it's no worse than some of the crazy shit PL/pgSQL already does, like trying to distinguish a string that executes a prepared statement from any other query. Fine with me to integrate that code if you're willing to contribute it, @decibel. |
It's MIT license, so have at it.
|
It'd be good if we could verify the arguments (or at least number of arguments) being passed to a trigger function by a specific trigger. According to [1], The arguments are concatinated together as NUL terminated strings in pg_trigger.tgargs.
1: http://www.postgresql.org/docs/devel/static/catalog-pg-trigger.html
The text was updated successfully, but these errors were encountered: