Re: trailing comment ghost-timing

From: "Erik Rijkers" <er(at)xs4all(dot)nl>
To: "Andres Freund" <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: trailing comment ghost-timing
Date: 2013-12-24 14:27:54
Message-ID: 2fd3c8c83f246ded12e45473e552ce9d.squirrel@webmail.xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, December 24, 2013 15:19, Andres Freund wrote:
> Hi,
>
> On 2013-12-24 02:05:23 +0100, Erik Rijkers wrote:
>> With \timing on, a trailing comment yields a timing.
>>
>> # test.sql
>> select 1;
>>
>> /*
>> select 2
>> */
>>
>> $ psql -f test.sql
>> ?column?
>> ----------
>> 1
>> (1 row)
>>
>> Time: 0.651 ms
>> Time: 0.089 ms
>>
>> I assume it is timing something about that comment (right?).
>>
>> Confusing and annoying, IMHO. Is there any chance such trailing ghost-timings can be removed?
>
> Maybe I am thinking to technical here, but why would that be a good
> idea? After all, the comment will have triggered sending a statement to
> the server and waiting for the result. The user might want to know about
> that.

Technical or non-technical; it's at least pretty inconsistent:
- it only times with the last comment.
- it only times with the /**/ comment; to time your trailing -- comments you'll have to find another solution :)

Obviously it's a minor thing, and I don't care if it does not get removed, but I don't think you can argue that it serves
any useful purpose in the current state.

Erik Rijkers

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-12-24 14:59:23 Re: trailing comment ghost-timing
Previous Message Andres Freund 2013-12-24 14:22:56 Re: preserving forensic information when we freeze