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 53120D1B8E3 for ; Thu, 4 Sep 2003 08:31:26 +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 15228-02 for ; Thu, 4 Sep 2003 05:31:17 -0300 (ADT) Received: from mail.mera.ru (FireWall.mera.ru [195.98.50.58]) by svr1.postgresql.org (Postfix) with ESMTP id 24F99D1B8E9 for ; Thu, 4 Sep 2003 05:31:15 -0300 (ADT) Received: from drweb by mail.mera.ru with drweb-scanned (Exim 4.20) id 19upWO-000NSG-4F for pgsql-interfaces@postgresql.org; Thu, 04 Sep 2003 12:31:16 +0400 Received: from [192.168.12.128] (helo=ulyanov) by mail.mera.ru with smtp (Exim 4.20) id 19upWN-000NSA-Jj for pgsql-interfaces@postgresql.org; Thu, 04 Sep 2003 12:31:15 +0400 X-AntiVirus: Checked by Dr.Web (http://www.drweb.net) Message-ID: <014901c372bf$4f8a9cb0$800ca8c0@meraqms.ru> From: "Yaroslav Ulyanov" To: References: <013a01c372bd$5fee1610$800ca8c0@meraqms.ru> Subject: pgAdmin3 - create function problem Date: Thu, 4 Sep 2003 12:34:08 +0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0146_01C372E0.D604DEB0" 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=1.0 tagged_above=0.0 required=5.0 tests=HTML_60_70, RCVD_IN_OSIRUSOFT_COM, REFERENCES X-Spam-Level: * X-Archive-Number: 200309/2 X-Sequence-Number: 4420 This is a multi-part message in MIME format. ------=_NextPart_000_0146_01C372E0.D604DEB0 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_0146_01C372E0.D604DEB0 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" ()= RETURNS=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:  pars= er: parse=20 error at or near "bigint" at character 16
 
 
That I do=20 wrong?
 
 
Best regards,
Yaroslav Ulyanov
yulyanov@mera.ru=20
------=_NextPart_000_0146_01C372E0.D604DEB0--