Create function problem - Mailing list pgsql-interfaces

From Yaroslav Ulyanov
Subject Create function problem
Date
Msg-id 013a01c372bd$5fee1610$800ca8c0@meraqms.ru
Whole thread Raw
Responses Re: Create function problem  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@mera.ru

pgsql-interfaces by date:

Previous
From: "Paul Muramira"
Date:
Subject: pgaccess
Next
From: "Yaroslav Ulyanov"
Date:
Subject: pgAdmin3 - create function problem