Skip site navigation (1) Skip section navigation (2)

Create function problem

From: "Yaroslav Ulyanov" <yulyanov(at)mera(dot)ru>
To: <pgsql-interfaces(at)postgresql(dot)org>
Subject: Create function problem
Date: 2003-09-04 08:20:17
Message-ID: 013a01c372bd$5fee1610$800ca8c0@meraqms.ru (view raw or flat)
Thread:
Lists: pgsql-interfaces
Hello

I cannot write new function with local variables:


CREATE FUNCTION "get_new_id1" () RETURNS bigint AS'
 declare
   id bigint;
 begin
   id:=nextval(\'id_sequence\'::text);
   return id;
 end;
'LANGUAGE 'sql' VOLATILE ;


Error message see when compiling:

ERROR:  parser: parse error at or near "bigint" at character 16


That I do wrong?


Best regards,
Yaroslav Ulyanov
yulyanov(at)mera(dot)ru 

Responses

pgsql-interfaces by date

Next:From: Yaroslav UlyanovDate: 2003-09-04 08:34:08
Subject: pgAdmin3 - create function problem
Previous:From: Hal VorleeDate: 2003-09-01 03:34:12
Subject: XA Resource Manager

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group