Hi, I found out that apparently in PGSQLKit there is an error in PQescapeStringConn or the way it is being used. From the docu I take it this is to prevent SQL injection attacks. I removed any processing and it turned out the issue ceases, all works fine. The call is here: -(NSString *)sqlEncodeString:(NSString *)toEncode { return toEncode; //size_t result; int error; char *sqlEncodeCharArray = malloc(1 + ([toEncode length] * 2)); // per the libpq doc. const char *sqlCharArrayToEncode = [toEncode cStringUsingEncoding:defaultEncoding]; size_t length = strlen(sqlCharArrayToEncode); PQescapeStringConn ((PGconn *)pgconn, sqlEncodeCharArray, (const char *)[toEncode cStringUsingEncoding:defaultEncoding], length, &error); NSString *encodedString = [[[NSString alloc] initWithFormat:@"%s",sqlEncodeCharArray] autorelease]; free(sqlEncodeCharArray); return encodedString; } This indicates that the problem is in PGSQLKit and not in any settings for tables or the database itself. So I take it to the Cocoa list at Apple. Thanks and regards Alex Am 22.03.2012 um 09:06 schrieb Alexander Reichstadt:
|