mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-21 02:41:07 +00:00
escape strings if ther warning about bad escapes is enabled
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@38067 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
374c7aa30a
commit
3a80c3c054
1 changed files with 13 additions and 3 deletions
16
Postgres.m
16
Postgres.m
|
@ -194,6 +194,10 @@ connectQuote(NSString *str)
|
|||
{
|
||||
const char *p;
|
||||
|
||||
backendPID = PQbackendPID(connection);
|
||||
|
||||
connected = YES;
|
||||
|
||||
p = PQparameterStatus(connection, "standard_conforming_strings");
|
||||
if (p != 0)
|
||||
{
|
||||
|
@ -201,11 +205,17 @@ connectQuote(NSString *str)
|
|||
}
|
||||
else
|
||||
{
|
||||
escapeStrings = NO;
|
||||
p = PQparameterStatus(connection, "escape_string_warning");
|
||||
if (p != 0)
|
||||
{
|
||||
escapeStrings = YES;
|
||||
}
|
||||
else
|
||||
{
|
||||
escapeStrings = NO;
|
||||
}
|
||||
}
|
||||
backendPID = PQbackendPID(connection);
|
||||
|
||||
connected = YES;
|
||||
if ([self debugging] > 0)
|
||||
{
|
||||
[self debug: @"Connected to '%@'", [self name]];
|
||||
|
|
Loading…
Reference in a new issue