Re: plpgsql Integer Concat To String - Mailing list pgsql-hackers

From Doug McNaught
Subject Re: plpgsql Integer Concat To String
Date
Msg-id 87smjii1l7.fsf@asmodeus.mcnaught.org
Whole thread Raw
In response to plpgsql Integer Concat To String  ("Paul Punett" <paul.punett@shazamteam.com>)
List pgsql-hackers
"Paul Punett" <paul.punett@shazamteam.com> writes:

> 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)

IdForEachRun := IdSet || counter::text;

-Doug


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Why isn't DECLARE CURSOR ... FOR UPDATE supported?
Next
From: Rod Taylor
Date:
Subject: Re: Why isn't DECLARE CURSOR ... FOR UPDATE supported?