Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f1NIGdx74642 for ; Fri, 23 Feb 2001 13:16:39 -0500 (EST) (envelope-from pgsql-interfaces-owner@postgresql.org) Received: from bloodcat.malva.com.ua ([193.193.194.126]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1MEkCx50123; Thu, 22 Feb 2001 09:46:15 -0500 (EST) (envelope-from bodnar@malva.com.ua) Received: from ALEX ([10.32.0.15]) by bloodcat.malva.com.ua with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id D9KK6Y4D; Thu, 22 Feb 2001 16:50:52 +0200 Message-ID: <001e01c09cde$23465ae0$0f00200a@alex> From: "Alexander Bodnar" To: , Subject: Help with plpgsql - subst variable value Date: Thu, 22 Feb 2001 16:45:44 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200102/169 X-Sequence-Number: 1127 Hi all. This my code snapshot: CREATE FUNCTION CreateObject(varchar(600)) RETURNS int4 AS ' DECLARE . . . ObjectSeqName text; BEGIN . . .. ObjectSeqName := ''ObjectLog'' || ObjectID || ''_Seq''; CREATE SEQUENCE ObjectSeqName start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 CYCLE; . . . END IF; RETURN ObjectID; END; ' LANGUAGE 'plpgsql'; When I run this function I got ERROR: parser: parse error at or near "$1" So how can get value of ObjectSeqName in sequence/table/etc. name?