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
This commit is contained in:
Richard Frith-MacDonald 2014-10-06 11:35:46 +00:00
parent c6fc158f34
commit 0f06c9b7fc

View file

@ -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)