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