Re: Connection gets into state where all queries fail

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Marco Colombo <marco(at)esi(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Connection gets into state where all queries fail
Date: 2004-06-29 20:22:12
Message-ID: 20040629202212.GC22115@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Eric Wright 2004-06-29 20:39:03 postgresql install: jdbc: No such file or directory.
Previous Message Franco Bruno Borghesi 2004-06-29 20:21:20 Re: