Re: Weird error message in SQL function call

From: Richard Huxton <dev(at)archonet(dot)com>
To: Vincenzo Romano <vincenzo(dot)romano(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Weird error message in SQL function call
Date: 2007-07-16 10:18:23
Message-ID: 469B45EF.3080906@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vincenzo Romano 2007-07-16 12:53:38 Re: Weird error message in SQL function call
Previous Message Vincenzo Romano 2007-07-16 10:03:43 Weird error message in SQL function call