Re: Connection gets into state where all queries fail - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Connection gets into state where all queries fail
Date
Msg-id 20040629202212.GC22115@dcc.uchile.cl
Whole thread Raw
In response to Re: Connection gets into state where all queries fail  (Marco Colombo <marco@esi.it>)
List pgsql-general
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)


pgsql-general by date:

Previous
From: Franco Bruno Borghesi
Date:
Subject: Re:
Next
From: Martijn van Oosterhout
Date:
Subject: Re: dup(0) failed after 3195 successes: Bad file descriptor