Susan Hoddinott wrote:
> Hi Andrea,
>
> That was my first attempt (i.e. using opaque) but unfortunately when I use
> "opaque" it tells me that SQL functions cannot return opaque. The parse
> error is also occurring on the create function statement prior to any
> knowledge that the function is being used for a trigger.
>
I haven't followed this thread too closely, but if you are trying to use
a SQL function for a trigger, it won't work. From the docs:
(http://www.us.postgresql.org/users-lounge/docs/7.3/postgres/triggers.html)
"Trigger functions can be written in C and most procedural languages, but not in SQL"
Try re-writing your function in PL/pgSQL. BTW, I think I saw from your
other post that you don't have PL/pgSQL installed in the database you
are using. See the createlang program or CREATE LANGUAGE statement:
http://www.us.postgresql.org/users-lounge/docs/7.3/postgres/app-createlang.htmlhttp://www.us.postgresql.org/users-lounge/docs/7.3/postgres/sql-createlanguage.html
HTH,
Joe