On 08/30/2013 12:04 AM, Pavel Stehule wrote:
This has a bit more value as it allows you to detect some (though not all) structural errors.
PERFORM just forces you to replace some SELECTs just to confirm
that you really did not want to capture the result.
If the original aim was somehow connected with allowing direct
function calls for PL/SQL compatibility, then why not just implement
direct function calls instead and let us have plain SELECT back ?
If you want a verbose expression for ignoring the result I'd suggest
something like "SELECT ... IGNORING RESULT" or "SELECT ... INTO VOID"
It is self-describing like most of SQL, instead of making you wander
each time if the word you want to replace SELECT with to ignore
the result was PERFORM or EXECUTE :)
But I can *not* see how allowing just SELECT and discarding the result has
any less "security", for any definition of security I can think of.
For me it is just an arbitrary nuisance, with which I can live, but I'd prefer not to.
Cheers
--
Hannu Krosing
PostgreSQL Consultant
Performance, Scalability and High Availability
2ndQuadrant Nordic OÜ