Re: plpgsql Integer Concat To String

From: Doug McNaught <doug(at)mcnaught(dot)org>
To: "Paul Punett" <paul(dot)punett(at)shazamteam(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: plpgsql Integer Concat To String
Date: 2003-12-18 15:32:04
Message-ID: 87smjii1l7.fsf@asmodeus.mcnaught.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

"Paul Punett" <paul(dot)punett(at)shazamteam(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2003-12-18 15:49:04 Re: Urgent: Key constraints behaving weirdly
Previous Message Rich Hall 2003-12-18 15:14:25 Re: plpgsql For SQLQuery Loop Flags Error

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2003-12-18 15:52:47 Re: Why isn't DECLARE CURSOR ... FOR UPDATE supported?
Previous Message Tom Lane 2003-12-18 15:20:14 Why isn't DECLARE CURSOR ... FOR UPDATE supported?