From 0f06c9b7fc48646a7f354e38d39062963dbcb7b0 Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Mon, 6 Oct 2014 11:35:46 +0000 Subject: [PATCH] sent the client name to the database server git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@38108 72102866-910b-0410-8b05-ffd578937521 --- Postgres.m | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Postgres.m b/Postgres.m index fc55dc3..f22b92d 100644 --- a/Postgres.m +++ b/Postgres.m @@ -170,10 +170,17 @@ connectQuote(NSString *str) [m appendString: @" password="]; [m appendString: str]; } + str = connectQuote([self clientName]); + if (str != nil) + { + [m appendString: @" application_name="]; + [m appendString: str]; + } if ([self debugging] > 0) { - [self debug: @"Connect to '%@' as %@", m, [self name]]; + [self debug: @"Connect to '%@' as %@ (%@)", + m, [self name], [self clientName]]; } connection = PQconnectdb([m UTF8String]); if (PQstatus(connection) != CONNECTION_OK)