Thread: How can I control whether to execute a query or not?

How can I control whether to execute a query or not?

From
mbenzid@yahoo.de (Mounir Benzid)
Date:
Hallo!
I'm using an interface to access my postgres 7.0.3 DB.

What I need is a switch to control the execution of queries:
select 'execute' as control,col1 from table1 where col1=? and control=?;

So, only if the 2nd ? contains the string "execute" the query will be executed.
But postgres doesn't except virtually declared columns in the where clause, so
is there a way to do this in postgres?

Thanks
Mounir