postgresql/src/include
Stephen Frost 8bddc86400 Add application_name to connection authorized msg
The connection authorized message has quite a bit of useful information
in it, but didn't include the application_name (when provided), so let's
add that as it can be very useful.

Note that at the point where we're emitting the connection authorized
message, we haven't processed GUCs, so it's not possible to get this by
using log_line_prefix (which pulls from the GUC).  There's also
something to be said for having this included in the connection
authorized message and then not needing to repeat it for every line, as
having it in log_line_prefix would do.

The GUC cleans the application name to pure-ascii, so do that here too,
but pull out the logic for cleaning up a string into its own function
in common and re-use it from those places, and check_cluster_name which
was doing the same thing.

Author: Don Seiler <don@seiler.us>
Discussion: https://postgr.es/m/CAHJZqBB_Pxv8HRfoh%2BAB4KxSQQuPVvtYCzMg7woNR3r7dfmopw%40mail.gmail.com
2018-09-28 19:04:50 -04:00
..
access Add support for nearest-neighbor (KNN) searches to SP-GiST 2018-09-19 01:54:10 +03:00
bootstrap Rationalize handling of array type names in bootstrap data. 2018-04-17 18:29:11 -04:00
catalog Remove fmgr.h inclusion from partition.h 2018-09-25 17:52:07 -03:00
commands Collect JIT instrumentation from workers. 2018-09-25 13:12:44 -07:00
common Add application_name to connection authorized msg 2018-09-28 19:04:50 -04:00
datatype Update copyright for 2018 2018-01-02 23:30:12 -05:00
executor Split ExecStoreTuple into ExecStoreHeapTuple and ExecStoreBufferHeapTuple. 2018-09-25 16:27:48 -07:00
fe_utils Add semicolons to end of internally run queries 2018-08-30 19:23:22 +02:00
foreign Allow insert and update tuple routing and COPY for foreign tables. 2018-04-06 19:22:03 -04:00
jit Collect JIT instrumentation from workers. 2018-09-25 13:12:44 -07:00
lib Code review for simplehash.h. 2018-08-28 12:32:22 +12:00
libpq Add application_name to connection authorized msg 2018-09-28 19:04:50 -04:00
mb Fix a boatload of typos in C comments. 2018-04-01 15:01:28 -04:00
nodes Collect JIT instrumentation from workers. 2018-09-25 13:12:44 -07:00
optimizer Don't allow LIMIT/OFFSET clause within sub-selects to be pushed to workers. 2018-09-14 09:36:30 +05:30
parser Fix INSERT ON CONFLICT UPDATE through a view that isn't just SELECT *. 2018-08-04 19:38:58 -04:00
partitioning Fix run-time partition pruning for appends with multiple source rels. 2018-08-01 19:42:52 -04:00
port Convert elog.c's useful_strerror() into a globally-used strerror wrapper. 2018-09-26 11:06:42 -04:00
portability Update copyright for 2018 2018-01-02 23:30:12 -05:00
postmaster Implement "pg_ctl logrotate" command 2018-09-01 19:46:49 +03:00
regex Update copyright for 2018 2018-01-02 23:30:12 -05:00
replication Fix memory leak in TRUNCATE decoding 2018-09-03 02:10:24 +02:00
rewrite Revert MERGE patch 2018-04-12 11:22:56 +01:00
snowball Sync our Snowball stemmer dictionaries with current upstream. 2018-09-24 17:29:38 -04:00
statistics Update copyright for 2018 2018-01-02 23:30:12 -05:00
storage Fix longstanding recursion hazard in sinval message processing. 2018-09-07 18:04:54 -04:00
tcop Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
tsearch Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
utils Fix assorted bugs in pg_get_partition_constraintdef(). 2018-09-27 18:15:17 -04:00
.gitignore Refactor dlopen() support 2018-09-06 11:33:04 +02:00
Makefile Refactor dlopen() support 2018-09-06 11:33:04 +02:00
c.h Always use our own versions of *printf(). 2018-09-26 13:13:57 -04:00
fmgr.h Add expression compilation support to LLVM JIT provider. 2018-03-22 14:45:59 -07:00
funcapi.h Clean up in the wake of TupleDescGetSlot() removal / 10763358c3. 2018-09-27 11:38:11 -07:00
getaddrinfo.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
getopt_long.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
miscadmin.h Switch flags tracking pending interrupts to sig_atomic_t 2018-09-27 07:47:20 +09:00
pg_config.h.in Try another way to detect the result type of strerror_r(). 2018-09-26 18:23:13 -04:00
pg_config.h.win32 Try another way to detect the result type of strerror_r(). 2018-09-26 18:23:13 -04:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Improve error reporting for unsupported effective_io_concurrency setting. 2018-09-28 16:12:13 -04:00
pg_getopt.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pg_trace.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pgstat.h Add wait event for fsync of WAL segments 2018-07-02 22:19:46 +09:00
pgtar.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pgtime.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
port.h Clean up *printf macros to avoid conflict with format archetypes. 2018-09-26 17:35:01 -04:00
postgres.h Detoast plpgsql variables if they might live across a transaction boundary. 2018-05-16 14:56:52 -04:00
postgres_ext.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
postgres_fe.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
rusagestub.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
windowapi.h Update copyright for 2018 2018-01-02 23:30:12 -05:00