Re: [PERFORM] ill-planned queries inside a stored procedure

2004-08-28 Thread Gaetano Mendola
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: | Gaetano Mendola <[EMAIL PROTECTED]> wrote .. | |>Hi all, |>do you know any clean workaround at ill-planned queries inside a stored |>procedure? | I use "EXECUTE" inside a stored procedure for just this purpose. This is | not t

Re: [PERFORM] ill-planned queries inside a stored procedure

2004-08-28 Thread andrew
I use "EXECUTE" inside a stored procedure for just this purpose. This is not the same as PREPARE/EXECUTE, it lets you send an arbitrary string as SQL within the procedure. You have to write the query text on the fly in the procedure, which can be a little messy with quoting and escaping. Gaetan

[PERFORM] ill-planned queries inside a stored procedure

2004-08-28 Thread Gaetano Mendola
Hi all, do you know any clean workaround at ill-planned queries inside a stored procedure? Let me explain with an example: empdb=# select count(*) from user_logs; count - 5223837 (1 row) empdb=# select count(*) from user_logs where id_user = 5024; count 239453 (1 row) empdb=#