mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-16 00:21:39 +00:00
fixup for warnings about escapes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@38068 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
90476078d5
commit
b1ccabeb7e
1 changed files with 11 additions and 9 deletions
20
Postgres.m
20
Postgres.m
|
@ -201,19 +201,21 @@ connectQuote(NSString *str)
|
|||
p = PQparameterStatus(connection, "standard_conforming_strings");
|
||||
if (p != 0)
|
||||
{
|
||||
/* The standard conforming strings setting exists,
|
||||
* so the E'...' syntax must exist and we can use
|
||||
* it for byte arrays.
|
||||
*/
|
||||
escapeStrings = YES;
|
||||
|
||||
/* If the escape_string_warning setting is on,
|
||||
* the server will warn about backslashes even
|
||||
* in properly quoted strings, so turn it off.
|
||||
*/
|
||||
[self execute: @"SET escape_string_warning=off", nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
p = PQparameterStatus(connection, "escape_string_warning");
|
||||
if (p != 0)
|
||||
{
|
||||
escapeStrings = YES;
|
||||
}
|
||||
else
|
||||
{
|
||||
escapeStrings = NO;
|
||||
}
|
||||
escapeStrings = NO;
|
||||
}
|
||||
|
||||
if ([self debugging] > 0)
|
||||
|
|
Loading…
Reference in a new issue