Re: varchar for loops possible?

From: Raymond O'Donnell <rod(at)iol(dot)ie>
To: "J(dot)V(dot)" <jvsrvcs(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: varchar for loops possible?
Date: 2012-05-21 21:55:58
Message-ID: 4FBAB9EE.5090802@iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)iol(dot)ie

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2012-05-22 02:55:22 Re: FATAL: lock file "postmaster.pid" already exists
Previous Message Merlin Moncure 2012-05-21 21:44:53 Re: how to for loop with distinct values?