plpgsql Integer Concat To String - Mailing list pgsql-bugs

From Puneet Paul
Subject plpgsql Integer Concat To String
Date
Msg-id 20031218142930.29076.qmail@web14525.mail.yahoo.com
Whole thread Raw
Responses Re: plpgsql Integer Concat To String  (Rich Hall <rhall@micropat.com>)
List pgsql-bugs
Hi,

I want to concatenate a it counter to a string in a
loop in plpgsql.
DECLARE
counter integer := 1;
IdSet char : = 'UniqueId'
IdForEachRun varchar;
BEGIN

IdForEachRun := IdSet || counter;(PROBLEM HERE)
--Or IdForEachRun := IdSet + counter;(PROBLEM HERE)
While condition LOOP

Insert into Table values(IdForEachRun, ......)



counter := counter + 1;
IdForEachRun := IdSet || counter;(PROBLEM HERE)
--Or IdForEachRun := IdSet + counter;(PROBLEM HERE)
END LOOP

END
Language 'plpgsql'

Thanks in advance.

Paul


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

pgsql-bugs by date:

Previous
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1014: postgres crash
Next
From: Tom Lane
Date:
Subject: Re: BUG #1013: Authentication doesn't work