Re: [GENERAL] Combining validation into main query

2013-01-12 Thread Adrian Klaver
On 01/12/2013 04:58 PM, Robert James wrote: Typically, my web application does some initial validation, then, if it passes, does the actual query. For both performance and simplicity, I'd like to combine these all into one trip to Postgres. Ideally, I'd like to do this in SQL. If that's not pos

Re: [GENERAL] Combining validation into main query

2013-01-12 Thread Serge Fonville
If you use EXISTS in the WHERE clause, you should come closer to what you want realised. For further help it would make it easier if you shared the whole queries and perhaps a more detailed description of the goal you are trying to accomplish. HTH Kind regards/met vriendelijke groet, Serge Fonvi

[GENERAL] Combining validation into main query

2013-01-12 Thread Robert James
Typically, my web application does some initial validation, then, if it passes, does the actual query. For both performance and simplicity, I'd like to combine these all into one trip to Postgres. Ideally, I'd like to do this in SQL. If that's not possible, I could use PL/pgsql, though I'm not ad