On Wed, Jun 23, 2004 at 01:06:24PM +0200, Marco Colombo wrote:
> Martijn van Oosterhout wrote:
> >Nope, psql breaks the statements on ';' and sends each query
> >individually, so the issue never comes up.
>
> Now I wonder, it's the psql program or the client library that does
> that? Shall I expect the same from within, say, PHP, Perl, Python, C?
psql does it, and no, other clients do not do that (or maybe they do,
but it's not a requirement because the server itself handles
multi-statement query strings too).
> Is it a (settable) option of the client code? If not, I expect psql
> to have some kind of SQL parser embedded, in order not to be fooled
> by such a query: "select * from tab where f1 = 'a;b;c'".
Yes, psql does some parsing; for example, to determine what character to
use at its prompt.
--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Por suerte hoy explotó el califont porque si no me habría muerto
de aburrido" (Papelucho)