aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/PostgresKit
diff options
context:
space:
mode:
Diffstat (limited to 'Frameworks/PostgresKit')
-rw-r--r--Frameworks/PostgresKit/Source/FLXPostgresError.m9
-rw-r--r--Frameworks/PostgresKit/Source/FLXPostgresResult.m4
-rw-r--r--Frameworks/PostgresKit/Source/FLXPostgresTypeStringHandler.m2
3 files changed, 5 insertions, 10 deletions
diff --git a/Frameworks/PostgresKit/Source/FLXPostgresError.m b/Frameworks/PostgresKit/Source/FLXPostgresError.m
index 927100f8..31024a92 100644
--- a/Frameworks/PostgresKit/Source/FLXPostgresError.m
+++ b/Frameworks/PostgresKit/Source/FLXPostgresError.m
@@ -97,12 +97,7 @@
_errorPrimaryMessage = [self _extractErrorField:PG_DIAG_MESSAGE_PRIMARY fromResult:result];
_errorDetailMessage = [self _extractErrorField:PG_DIAG_MESSAGE_DETAIL fromResult:result];
_errorMessageHint = [self _extractErrorField:PG_DIAG_MESSAGE_HINT fromResult:result];
-
- NSString *statementPosition = [self _extractErrorField:PG_DIAG_STATEMENT_POSITION fromResult:result];
-
- _errorStatementPosition = [statementPosition integerValue];
-
- [statementPosition release];
+ _errorStatementPosition = [[self _extractErrorField:PG_DIAG_STATEMENT_POSITION fromResult:result] integerValue];
}
/**
@@ -115,7 +110,7 @@
*/
- (NSString *)_extractErrorField:(int)field fromResult:(const PGresult *)result
{
- return [[NSString alloc] initWithUTF8String:PQresultErrorField(result, field)];
+ return [[[NSString alloc] initWithUTF8String:PQresultErrorField(result, field)] autorelease];
}
#pragma mark -
diff --git a/Frameworks/PostgresKit/Source/FLXPostgresResult.m b/Frameworks/PostgresKit/Source/FLXPostgresResult.m
index 2da1a78f..0d9656d0 100644
--- a/Frameworks/PostgresKit/Source/FLXPostgresResult.m
+++ b/Frameworks/PostgresKit/Source/FLXPostgresResult.m
@@ -234,9 +234,9 @@ static NSString *FLXPostgresResultError = @"FLXPostgresResultError";
id handler = _typeHandlers[column];
if (!handler) {
- _typeHandlers[column] = [_connection typeHandlerForRemoteType:type];
+ handler = [_connection typeHandlerForRemoteType:type];
- handler = _typeHandlers[column];
+ _typeHandlers[column] = handler;
}
return handler;
diff --git a/Frameworks/PostgresKit/Source/FLXPostgresTypeStringHandler.m b/Frameworks/PostgresKit/Source/FLXPostgresTypeStringHandler.m
index 26c0ba32..aa7adf2a 100644
--- a/Frameworks/PostgresKit/Source/FLXPostgresTypeStringHandler.m
+++ b/Frameworks/PostgresKit/Source/FLXPostgresTypeStringHandler.m
@@ -82,7 +82,7 @@ static FLXPostgresOid FLXPostgresTypeStringTypes[] =
return [self _macAddressFromResult:result atRow:row column:column];
case FLXPostgresOidInetAddr:
case FLXPostgresOidCidrAddr:
- return [self _inetAddressFromResult:result atRow:row column:column type:type];
+ return [self _inetAddressFromResult:result atRow:row column:column type:type];
case FLXPostgresOidText:
case FLXPostgresOidChar:
case FLXPostgresOidName: