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

From Martijn van Oosterhout
Subject Re: Connection gets into state where all queries fail
Date
Msg-id 20040629213748.GB26381@svana.org
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?
> 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'".

Correct, there is a basic parser to track strings and such. It's not
particularly clever, since it doesn't have know about keywords or
nesting, but it does work.
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: dup(0) failed after 3195 successes: Bad file descriptor
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Can I interrupt queries already processing in the server?