Re: Weird error message in SQL function call - Mailing list pgsql-general

From Richard Huxton
Subject Re: Weird error message in SQL function call
Date
Msg-id 469B45EF.3080906@archonet.com
Whole thread Raw
In response to Weird error message in SQL function call  (Vincenzo Romano <vincenzo.romano@gmail.com>)
Responses Re: Weird error message in SQL function call  (Vincenzo Romano <vincenzo.romano@gmail.com>)
List pgsql-general
Vincenzo Romano wrote:
> Hi all.
>
> I've got this error message while running an SQL function:
>
> ---- BEGIN
> psql:filtb.sql:1029: ERROR:  COMMIT is not allowed in a SQL function
> CONTEXT:  SQL function "f_relazione" during startup
> funzione SQL "f_relazione" istruzione 1
> ----  END
>
> Of course, I have no COMMIT command either in the function itself or
> in any other function called by f_relazione().

Seeing as you are reading in a large .sql file, I'd look for a quoting
error - if the closing quote for the function-body isn't correct it'll
run on, and then encounter a COMMIT further down the file.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Vincenzo Romano
Date:
Subject: Weird error message in SQL function call
Next
From: Vincenzo Romano
Date:
Subject: Re: Weird error message in SQL function call