Re: prepared query plan did not update - Mailing list pgsql-sql

From Emi Lu
Subject Re: prepared query plan did not update
Date
Msg-id 48D15D74.3030808@encs.concordia.ca
Whole thread Raw
In response to Re: prepared query plan did not update  ("Igor Neyman" <ineyman@perceptron.com>)
List 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';





pgsql-sql by date:

Previous
From: "Igor Neyman"
Date:
Subject: Re: prepared query plan did not update
Next
From: Stephan Szabo
Date:
Subject: Re: prepared query plan did not update