Re: [HACKERS] idea: custom log_line_prefix components besides application_name - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] idea: custom log_line_prefix components besides application_name
Date
Msg-id 17068.1494357861@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] idea: custom log_line_prefix components besidesapplication_name  (David Fetter <david@fetter.org>)
List pgsql-hackers
David Fetter <david@fetter.org> writes:
> On Tue, May 09, 2017 at 12:48:01PM -0400, Tom Lane wrote:
>> I don't think that's a problem: while psql will remove "--" and everything
>> following it until newline, it won't remove the newline.  So there's still
>> a token boundary there.

> We may still need to be careful.

> davidfetter@davidfetter=# SELECT 'foo'-- stuff goes here
> 'bar';
>  ?column?
> ----------
>  foobar
> (1 row)

If you read the SQL spec, you'll find that particular behavior is
required by spec, and would still be required by spec with or
without the comment.  Perhaps it's a trap for unwary SQL programmers,
but psql isn't making it worse.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] proposal psql \gdesc
Next
From: Serge Rielau
Date:
Subject: Re: [HACKERS] CTE inlining