Re: varchar for loops possible? - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: varchar for loops possible?
Date
Msg-id 4FBAB9EE.5090802@iol.ie
Whole thread Raw
In response to varchar for loops possible?  ("J.V." <jvsrvcs@gmail.com>)
List pgsql-general
On 18/05/2012 21:30, J.V. wrote:
> update table set varcharid = ''' || tmp_var || '''

Others have answered your question, but there's a problem here too; you
don't need the quotes. This statement should be just:

  update table set varcharid = tmp_var;

...assuming that the types match, of course.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

pgsql-general by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: how to for loop with distinct values?
Next
From: Tom Lane
Date:
Subject: Re: FATAL: lock file "postmaster.pid" already exists