Andrew Dunstan <and...@dunslane.net> writes: > On 02/17/2012 03:58 PM, Thom Brown wrote: >> On 17 February 2012 20:40, Dimitri Fontaine<dimi...@2ndquadrant.fr> wrote: >>> I'm not so sure about other function properties (SET, COST, ROWS, >>> SECURITY DEFINER etc) because applying default and punting users to go >>> use the full CREATE FUNCTION syntax would be a practical answer here.
> This is going to be pretty much a piece of syntactic sugar. Would it > matter that much if the trigger functions made thus are all volatile? If > someone wants the full function feature set they can always use CREATE > FUNCTION first. I think I'm with Dimitri - let's keep it simple. Volatility is a complete no-op for a trigger function anyway, as are other planner parameters such as cost/rows, because there is no planning involved in trigger calls. Of the existing CREATE FUNCTION options, I think only LANGUAGE, SECURITY DEFINER, and SET are of any possible interest for a trigger function. And I don't have any problem deeming SET a second-order thing that you should have to go use CREATE FUNCTION for. But perhaps SECURITY DEFINER is a common enough need to justify including in this shorthand form. Has anybody stopped to look at the SQL standard for this? In-line trigger definitions are actually what they intend, IIRC. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers