Re: Connection gets into state where all queries fail

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
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 21:37:48
Message-ID: 20040629213748.GB26381@svana.org
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?
> 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(at)svana(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2004-06-29 21:42:36 Re: dup(0) failed after 3195 successes: Bad file descriptor
Previous Message Martijn van Oosterhout 2004-06-29 21:36:11 Re: Can I interrupt queries already processing in the server?