Re: [PATCH] Include application_name in "connection authorized" log message - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Include application_name in "connection authorized" log message
Date
Msg-id 24593.1533663162@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] Include application_name in "connection authorized" log message  (Don Seiler <don@seiler.us>)
Responses Re: [PATCH] Include application_name in "connection authorized" log message
List pgsql-hackers
Don Seiler <don@seiler.us> writes:
> On Tue, Aug 7, 2018 at 11:29 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Well, if you're going to insist on that part, it's probably not worth
>> making the application_name GUC have inconsistent behavior.

> OK so just to make sure I understand:

> 1. We want to make a generic, central ascii-lobotomizing function similar
> to check_application_name that we can re-use there and for other checks (eg
> user name).
> 2. Change check_application_name to call this function (or just call this
> function instead of check_application_name()?)

check_application_name's API is dictated by the GUC check-hook interface,
and doesn't really make sense for this other use.  So the first part of
that, not the second.

> 3. Call this function when storing the value in the port struct.

I'm not sure where exactly is the most sensible place to call it,
but trying to minimize the number of places that know about this
kluge seems like a good principle.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump: sortDumpableObjectsByTypeName() doesn't always do that
Next
From: Bruce Momjian
Date:
Subject: Re: Typo in doc or wrong EXCLUDE implementation