Hi,
Trigger functions are supposed to be able to be called only as triggers,
but apparently the check is not working in CVS HEAD:
alvherre=# create or replace function foo () returns trigger as $$ begin perform 1; return new; end; $$ language
plpgsql;
CREATE FUNCTION
alvherre=# select foo();foo
-----
(1 fila)
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support