From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | "P(dot)M" <pmdanger(at)yahoo(dot)com> |
Cc: | "PostgreSQL General (EN)" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: error in SELECT |
Date: | 2006-05-27 15:49:24 |
Message-ID: | 20060527154923.GA42745@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sat, May 27, 2006 at 08:20:47AM -0700, P.M wrote:
> i've just migrated a stored procedure from MySQl to PostgreSQL and i have the following error :
> ERROR: syntax error at or near "SELECT" at character 371
>
> here is my function in PostgreSQL :
> CREATE OR REPLACE FUNCTION immense_sp001(VARCHAR,VARCHAR, service_nom VARCHAR, OUT result BOOLEAN, OUT error_message VARCHAR)
> RETURNS record LANGUAGE plpgsql
> AS '
> BEGIN
> DECLARE
BEGIN should follow the variable declarations. See "Structure of
PL/pgSQL" in the documentation:
http://www.postgresql.org/docs/8.1/interactive/plpgsql-structure.html
The function also has other MySQLisms such as auto_increment and the
use of "set". See the PL/pgSQL and other PostgreSQL documentation
for the appropriate syntax.
--
Michael Fuhr
From | Date | Subject | |
---|---|---|---|
Next Message | P.M | 2006-05-27 16:39:52 | Re: error in SELECT |
Previous Message | Tom Lane | 2006-05-27 15:37:35 | Re: error in SELECT |