Re: prepared query plan did not update

From: Emi Lu <emilu(at)encs(dot)concordia(dot)ca>
To: Igor Neyman <ineyman(at)perceptron(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: prepared query plan did not update
Date: 2008-09-17 19:41:40
Message-ID: 48D15D74.3030808@encs.concordia.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> 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' ;
> EXECUTE pname( 'value' )
> Could someone tell me where I did wrong please?
>
>
>
>
>
> WHERE col1 AND
> col2 = '$1' ;
> Are you looking for both: col1 and col2 - to be equal to '$1'?
> Then it should be:
> WHERE col1 = '$1' AND
> col2 = '$1';

Not exactly, col1 is boolean value

WHERE col1 = true AND
col2 = '$1';

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2008-09-17 20:09:11 Re: prepared query plan did not update
Previous Message Igor Neyman 2008-09-17 19:28:55 Re: prepared query plan did not update