Re: [GENERAL] How can I use parameters in plain sql

2010-09-05 Thread Cédric Villemain
2010/9/3 Merlin Moncure mmonc...@gmail.com: On Fri, Sep 3, 2010 at 3:47 PM, John Adams john_adams_m...@yahoo.com wrote: psql has some client side manged variables, and you can of course use pl/pgsql. Do you mean I should use a pl/pgsql stored procedure or do I have to somehow mark the sql as

[GENERAL] How can I use parameters in plain sql

2010-09-03 Thread John Adams
How can I use parameters in plain sql like sql server. FICTIONAL example that works for sql server: declare @i int; set @i = 1; select * from mytable where i...@i;

Re: [GENERAL] How can I use parameters in plain sql

2010-09-03 Thread Merlin Moncure
On Fri, Sep 3, 2010 at 2:45 PM, John Adams john_adams_m...@yahoo.com wrote: How can I use parameters in plain sql like sql server. FICTIONAL example that works for sql server: declare @i int; set @i = 1; select * from mytable where i...@i; postgresql doesn't support variables in plain sql.

Re: [GENERAL] How can I use parameters in plain sql

2010-09-03 Thread Merlin Moncure
On Fri, Sep 3, 2010 at 3:47 PM, John Adams john_adams_m...@yahoo.com wrote: psql has some client side manged variables, and you can of course use pl/pgsql. Do you mean I should use a pl/pgsql stored procedure or do I have to somehow mark the sql as pl/pgsql? How? Because in sql server it is