From: Alexander Bodnar <bodnar@malva.com.ua>
To: pgsql-general@postgresql.org
To: pgsql-interfaces@postgresql.org
Subject: Help with plpgsql - subst variable value
Date: Thu, 22 Feb 2001 16:45:44 +0200
Message-ID: <001e01c09cde$23465ae0$0f00200a@alex> (raw)
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?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: bodnar@malva.com.ua, pgsql-general@postgresql.org
Subject: Re: Help with plpgsql - subst variable value
In-Reply-To: <001e01c09cde$23465ae0$0f00200a@alex>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox