X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 0A9D9D1B9C0 for ; Thu, 4 Sep 2003 08:17:56 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 15212-01 for ; Thu, 4 Sep 2003 05:17:25 -0300 (ADT) Received: from mail.mera.ru (FireWall.mera.ru [195.98.50.58]) by svr1.postgresql.org (Postfix) with ESMTP id C29F7D1B98D for ; Thu, 4 Sep 2003 05:17:23 -0300 (ADT) Received: from drweb by mail.mera.ru with drweb-scanned (Exim 4.20) id 19upIy-000MuC-LG for pgsql-interfaces@postgresql.org; Thu, 04 Sep 2003 12:17:24 +0400 Received: from [192.168.12.128] (helo=ulyanov) by mail.mera.ru with smtp (Exim 4.20) id 19upIy-000Mu3-55 for pgsql-interfaces@postgresql.org; Thu, 04 Sep 2003 12:17:24 +0400 X-AntiVirus: Checked by Dr.Web (http://www.drweb.net) Message-ID: <013a01c372bd$5fee1610$800ca8c0@meraqms.ru> From: "Yaroslav Ulyanov" To: Subject: Create function problem Date: Thu, 4 Sep 2003 12:20:17 +0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0137_01C372DE.E6C719E0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=HTML_50_60 X-Spam-Level: X-Archive-Number: 200309/1 X-Sequence-Number: 4419 This is a multi-part message in MIME format. ------=_NextPart_000_0137_01C372DE.E6C719E0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Hello I cannot write new function with local variables: CREATE FUNCTION "get_new_id1" () RETURNS bigint AS' declare id bigint; begin id:=3Dnextval(\'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=20 ------=_NextPart_000_0137_01C372DE.E6C719E0 Content-Type: text/html; charset="koi8-r" Content-Transfer-Encoding: quoted-printable
Hello
 
I cannot write new function with local=20 variables:
 
 
CREATE FUNCTION "get_new_id1" () R= ETURNS=20 bigint AS'
 declare
   id=20 bigint;
 begin
  =20 id:=3Dnextval(\'id_sequence\'::text);
   return=20 id;
 end;
'LANGUAGE 'sql' VOLATILE ;
 
 
Error message see when=20 compiling:
 
ERROR:  parser= : parse=20 error at or near "bigint" at character 16
 
 
That I do=20 wrong?
 
 
Best regards,
Yaroslav Ulyanov
yulyanov@mera.ru
<= /HTML> ------=_NextPart_000_0137_01C372DE.E6C719E0--