Re: Create function statement with insert statement
От | Joe Conway |
---|---|
Тема | Re: Create function statement with insert statement |
Дата | |
Msg-id | 3E722F91.6070506@joeconway.com обсуждение исходный текст |
Ответ на | Re: Create function statement with insert statement ("Susan Hoddinott" <susan@hexworx.com>) |
Список | pgsql-sql |
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.html http://www.us.postgresql.org/users-lounge/docs/7.3/postgres/sql-createlanguage.html HTH, Joe
В списке pgsql-sql по дате отправления: