Re: trailing comment ghost-timing - Mailing list pgsql-hackers

From Fabrízio de Royes Mello
Subject Re: trailing comment ghost-timing
Date
Msg-id CAFcNs+pkCAzhxJw63Chf2ni6ma89WevBEj3xzuR_QcWaZDNpdg@mail.gmail.com
Whole thread Raw
In response to Re: trailing comment ghost-timing  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: trailing comment ghost-timing
List pgsql-hackers

On Tue, Dec 24, 2013 at 5:53 AM, Martijn van Oosterhout <kleptog@svana.org> wrote:
>
> On Tue, Dec 24, 2013 at 03:40:58AM +0100, Andreas Karlsson wrote:
> > On 12/24/2013 03:17 AM, David Johnston wrote:
> > It is not sent to the server as a trailing comment. The following
> > file is sent to the server like this.
> >
> > File:
> > /**/;
> > /**/
> >
> > Commands:
> > PQexec(..., "/**/;");
> > PQexec(..., "/**/");
> >
> > If this has to be fixed it should be in the client. I think people
> > would complain if we broke the API by starting to throw an exception
> > on PQexec with a string containing no actual query.
>
> (Untested). Isn't this just a case of psql not printing out a timing if
> the server responds with PGRES_EMPTY_QUERY?
>

Works... look to the attached patch!

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
Attachment

pgsql-hackers by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: trailing comment ghost-timing
Next
From: Craig Ringer
Date:
Subject: Re: varattno remapping