Skip site navigation (1) Skip section navigation (2)

Re: prepared query plan did not update

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Emi Lu <emilu(at)encs(dot)concordia(dot)ca>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: prepared query plan did not update
Date: 2008-09-17 20:09:11
Message-ID: 20080917130729.G21635@megazone.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-sql
On Wed, 17 Sep 2008, Emi Lu wrote:

> Good morning,
>
> I tried to use prepared query plan to update columns, but it did not
> update at all.
>
> PREPARE pname(varchar) AS
> UPDATE t1
> SET    col1 = false
> WHERE  col1 AND
>         col2 = '$1' ;

I don't think you want those quotes in the second part of the where
clause. I'm pretty sure that means you're comparing against the literal
string with a dollar sign and one rather than the value given at execute
time for $1.

In response to

Responses

pgsql-sql by date

Next:From: Emi LuDate: 2008-09-17 20:12:30
Subject: Re: prepared query plan did not update
Previous:From: Emi LuDate: 2008-09-17 19:41:40
Subject: Re: prepared query plan did not update

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group