Bergbom Staffan wrote: > I get the following error: > ERROR: SPI execute_plan failed executing query “Commit”: > SPI_ERROR_TRANSACTION > CONTEXT: Pl/pgSQL function “objectdescription_bu” line 9 at SQL statement > > What does this mean and what should I do to be able to do the desired check It's not possible to commit or rollback inside a function. Instead of issuing a rollback, you could raise an exception, and instead of doing a commit, you should do nothing at all. Best regards, -- Daniel PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general