Rename references to PostgreSQL files.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@23525 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Ayers 2006-09-15 13:01:07 +00:00
parent 35d4d28639
commit f2a887e922
18 changed files with 238 additions and 249 deletions

View file

@ -33,46 +33,46 @@ include ../../Version
POSTGRES_DATABASE=@POSTGRES_DATABASE@
# The framework to be compiled
FRAMEWORK_NAME=PostgresEOAdaptor
FRAMEWORK_NAME=PostgreSQLEOAdaptor
SUBPROJECTS = LoginPanel
# The framework principal class
PostgresEOAdaptor_PRINCIPAL_CLASS = PostgresAdaptor
PostgreSQLEOAdaptor_PRINCIPAL_CLASS = PostgreSQLAdaptor
# The framework Objective-C source files to be compiled
PostgresEOAdaptor_OBJC_FILES = \
PostgresAdaptor.m \
PostgresContext.m \
PostgresChannel.m \
PostgresSQLExpression.m \
PostgresValues.m \
PostgresPrivate.m
PostgreSQLEOAdaptor_OBJC_FILES = \
PostgreSQLAdaptor.m \
PostgreSQLContext.m \
PostgreSQLChannel.m \
PostgreSQLExpression.m \
PostgreSQLValues.m \
PostgreSQLPrivate.m
PostgresEOAdaptor_HEADER_FILES = \
PostgresAdaptor.h \
PostgresContext.h \
PostgresChannel.h \
PostgresSQLExpression.h \
PostgresValues.h
PostgreSQLEOAdaptor_HEADER_FILES = \
PostgreSQLAdaptor.h \
PostgreSQLContext.h \
PostgreSQLChannel.h \
PostgreSQLExpression.h \
PostgreSQLValues.h
PostgresEOAdaptor_AUTOGSDOC_HEADERS = $(PostgresEOAdaptor_HEADER_FILES)
PostgresEOAdaptor_AUTOGSDOC_SOURCE = $(PostgresEOAdaptor_OBJC_FILES)
DOCUMENT_NAME = PostgresEOAdaptor
PostgresEOAdaptor_AGSDOC_FILES = PostgresEOAdaptor.gsdoc $(PostgresEOAdaptor_AUTOGSDOC_HEADERS)
#$(PostgresEOAdaptor_AUTOGSDOC_SOURCE)
PostgresEOAdaptor_AGSDOC_FLAGS = \
PostgreSQLEOAdaptor_AUTOGSDOC_HEADERS = $(PostgreSQLEOAdaptor_HEADER_FILES)
PostgreSQLEOAdaptor_AUTOGSDOC_SOURCE = $(PostgreSQLEOAdaptor_OBJC_FILES)
DOCUMENT_NAME = PostgreSQLEOAdaptor
PostgreSQLEOAdaptor_AGSDOC_FILES = PostgreSQLEOAdaptor.gsdoc $(PostgreSQLEOAdaptor_AUTOGSDOC_HEADERS)
#$(PostgreSQLEOAdaptor_AUTOGSDOC_SOURCE)
PostgreSQLEOAdaptor_AGSDOC_FLAGS = \
-Declared Foundation \
-Standards YES \
-SystemProjects System \
-Project PostgresEOAdaptor \
-Project PostgreSQLEOAdaptor \
-WordMap '{\
FOUNDATION_EXPORT=extern;FOUNDATION_STATIC_INLINE="";\
GS_GEOM_SCOPE=extern;GS_GEOM_ATTR="";\
GS_EXPORT=extern;GS_DECLARE="";\
GS_RANGE_SCOPE=extern;GS_RANGE_ATTR="";\
GS_ZONE_SCOPE=extern;GS_ZONE_ATTR="";\
}' -Up PostgresEOAdaptor
}' -Up PostgreSQLEOAdaptor
-include Makefile.preamble

View file

@ -1,5 +1,5 @@
{
EOAdaptorClassName = PostgresAdaptor;
NSPrincipalClass = PostgresAdaptor;
NSExecutable = Postgres;
EOAdaptorClassName = PostgreSQLAdaptor;
NSPrincipalClass = PostgreSQLAdaptor;
NSExecutable = PostgreSQL;
}

View file

@ -1,12 +1,12 @@
/*
PostgresAdaptor.h
PostgreSQLAdaptor.h
Copyright (C) 2000,2002,2003,2005 Free Software Foundation, Inc.
Author: Mirko Viviani <mirko.viviani@gmail.com
Date: February 2000
based on the Postgres adaptor written by
based on the PostgreSQL adaptor written by
Mircea Oancea <mircea@jupiter.elcom.pub.ro>
This file is part of the GNUstep Database Library.
@ -27,13 +27,13 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __PostgresAdaptor_h__
#define __PostgresAdaptor_h__
#ifndef __PostgreSQLAdaptor_h__
#define __PostgreSQLAdaptor_h__
#include <EOAccess/EOAdaptor.h>
/* Include Postgres Headers */
/* Include PostgreSQL Headers */
#undef Assert
#include <stdio.h>
@ -70,7 +70,7 @@
extern int
postgresClientVersion();
@interface PostgresAdaptor : EOAdaptor
@interface PostgreSQLAdaptor : EOAdaptor
{
NSMutableArray *_pgConnPool;
int _pgConnPoolLimit;
@ -103,8 +103,8 @@ postgresClientVersion();
- (void)setPrimaryKeySequenceNameFormat: (NSString*)format;
- (NSString*)primaryKeySequenceNameFormat;
extern NSString *PostgresException;
extern NSString *PostgreSQLException;
@end
#endif /* __PostgresAdaptor_h__ */
#endif /* __PostgreSQLAdaptor_h__ */

View file

@ -1,12 +1,12 @@
/**
PostgresAdaptor.m <title>PostgresAdaptor</title>
PostgreSQLAdaptor.m <title>PostgreSQLAdaptor</title>
Copyright (C) 2000,2002,2003,2004,2005 Free Software Foundation, Inc.
Author: Mirko Viviani <mirko.viviani@gmail.com>
Date: February 2000
based on the Postgres adaptor written by
based on the PostgreSQL adaptor written by
Mircea Oancea <mircea@jupiter.elcom.pub.ro>
Author: Manuel Guesdon <mguesdon@orange-concept.com>
@ -70,15 +70,15 @@ RCS_ID("$Id$")
#include <EOAccess/EOEntity.h>
#include <EOAccess/EOModel.h>
#include <PostgresEOAdaptor/PostgresAdaptor.h>
#include <PostgresEOAdaptor/PostgresContext.h>
#include <PostgresEOAdaptor/PostgresChannel.h>
#include <PostgresEOAdaptor/PostgresSQLExpression.h>
#include <PostgresEOAdaptor/PostgresValues.h>
#include <PostgreSQLEOAdaptor/PostgreSQLAdaptor.h>
#include <PostgreSQLEOAdaptor/PostgreSQLContext.h>
#include <PostgreSQLEOAdaptor/PostgreSQLChannel.h>
#include <PostgreSQLEOAdaptor/PostgreSQLExpression.h>
#include <PostgreSQLEOAdaptor/PostgreSQLValues.h>
#include "PostgresPrivate.h"
#include "PostgreSQLPrivate.h"
NSString *PostgresException = @"PostgresException";
NSString *PostgreSQLException = @"PostgreSQLException";
static int pgConnTotalAllocated = 0;
static int pgConnCurrentAllocated = 0;
@ -95,11 +95,11 @@ postgresClientVersion()
}
@implementation PostgresAdaptor
@implementation PostgreSQLAdaptor
- init
{
return [self initWithName: @"Postgres"];
return [self initWithName: @"PostgreSQL"];
}
- initWithName: (NSString *)name
@ -288,7 +288,7 @@ static NSString *typeNames[][2] = {
- (EOAdaptorContext *)createAdaptorContext
{
//OK
return [PostgresContext adaptorContextWithAdaptor: self];
return [PostgreSQLContext adaptorContextWithAdaptor: self];
}
- (Class)defaultExpressionClass
@ -297,7 +297,7 @@ static NSString *typeNames[][2] = {
EOFLOGObjectFnStart();
expressionClass = [PostgresSQLExpression class];
expressionClass = [PostgreSQLExpression class];
EOFLOGObjectFnStop();
@ -353,7 +353,7 @@ static NSString *typeNames[][2] = {
-(NSString *)formatValue:(id)value
forAttribute:(EOAttribute*)attribute
{
return [value stringValueForPostgresType:[attribute externalType]
return [value stringValueForPostgreSQLType:[attribute externalType]
attribute:attribute];
}
*/
@ -384,7 +384,7 @@ static NSString *typeNames[][2] = {
return value;
}
/* Private methods for Postgres Adaptor */
/* Private methods for PostgreSQL Adaptor */
- (PGconn *)createPGconn
{
@ -425,7 +425,7 @@ static NSString *typeNames[][2] = {
NSDebugMLog(@"%s %s %s %s %s", pg_host, pg_port, pg_database, pg_user, pg_pwd);
// Try to connect to the Postgres server
// Try to connect to the PostgreSQL server
if (pg_user)
pgConn = PQsetdbLogin(pg_host, pg_port, pg_options, pg_tty,
pg_database,pg_user,pg_pwd);
@ -542,7 +542,7 @@ static NSString *typeNames[][2] = {
return _primaryKeySequenceNameFormat;
}
@end /* PostgresAdaptor */
@end /* PostgreSQLAdaptor */
/*
//TODO

View file

@ -1,12 +1,12 @@
/* -*-objc-*-
PostgresChannel.h
PostgreSQLChannel.h
Copyright (C) 2000,2002,2003,2004,2005 Free Software Foundation, Inc.
Author: Mirko Viviani <mirko.viviani@gmail.com>
Date: February 2000
based on the Postgres adaptor written by
based on the PostgreSQL adaptor written by
Mircea Oancea <mircea@jupiter.elcom.pub.ro>
This file is part of the GNUstep Database Library.
@ -27,11 +27,11 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __PostgresChannel_h__
#define __PostgresChannel_h__
#ifndef __PostgreSQLChannel_h__
#define __PostgreSQLChannel_h__
#include <EOAccess/EOAdaptorChannel.h>
#include <PostgresEOAdaptor/PostgresContext.h>
#include <PostgreSQLEOAdaptor/PostgreSQLContext.h>
@class NSString;
@ -39,9 +39,9 @@
@class NSMutableArray;
@class EOAttribute;
@interface PostgresChannel : EOAdaptorChannel
@interface PostgreSQLChannel : EOAdaptorChannel
{
PostgresContext *_adaptorContext;
PostgreSQLContext *_adaptorContext;
PGconn *_pgConn;
PGresult *_pgResult;
NSArray *_attributes;
@ -83,13 +83,13 @@
withAttributes: (NSArray*)attributes;
@end
@interface NSObject (PostgresChannelDelegate)
@interface NSObject (PostgreSQLChannelDelegate)
- (void)postgresChannel: (PostgresChannel*)channel
- (void)postgresChannel: (PostgreSQLChannel*)channel
insertedRowWithOid: (Oid)oid;
- (void)postgresChannel: (PostgresChannel*)channel
- (void)postgresChannel: (PostgreSQLChannel*)channel
receivedNotification: (NSString*)notification;
@end
#endif /* __PostgresChannel_h__ */
#endif /* __PostgreSQLChannel_h__ */

View file

@ -1,12 +1,12 @@
/**
PostgresChannel.m <title>PostgresChannel</title>
PostgreSQLChannel.m <title>PostgreSQLChannel</title>
Copyright (C) 2000-2002,2003,2004,2005 Free Software Foundation, Inc.
Author: Mirko Viviani <mirko.viviani@gmail.com>
Date: February 2000
based on the Postgres adaptor written by
based on the PostgreSQL adaptor written by
Mircea Oancea <mircea@jupiter.elcom.pub.ro>
Author: Manuel Guesdon <mguesdon@orange-concept.com>
@ -73,11 +73,11 @@ RCS_ID("$Id$")
#include <EOAccess/EOModel.h>
#include <EOAccess/EOSQLExpression.h>
#include <PostgresEOAdaptor/PostgresChannel.h>
#include <PostgresEOAdaptor/PostgresContext.h>
#include <PostgresEOAdaptor/PostgresValues.h>
#include <PostgreSQLEOAdaptor/PostgreSQLChannel.h>
#include <PostgreSQLEOAdaptor/PostgreSQLContext.h>
#include <PostgreSQLEOAdaptor/PostgreSQLValues.h>
#include "PostgresPrivate.h"
#include "PostgreSQLPrivate.h"
static void __dummy_function_used_for_linking(void)
{
@ -179,7 +179,7 @@ pgResultDictionary(PGresult *pgResult)
nil];
}
@implementation PostgresChannel
@implementation PostgreSQLChannel
+ (void) initialize
{
@ -189,7 +189,7 @@ pgResultDictionary(PGresult *pgResult)
Class aClass=Nil;
PSQLA_PrivInit();
aClass=[PostgresValues class]; // Force Initialize;
aClass=[PostgreSQLValues class]; // Force Initialize;
};
};
@ -202,7 +202,7 @@ pgResultDictionary(PGresult *pgResult)
if (_pgResult == NULL || PQresultStatus(_pgResult) != PGRES_COMMAND_OK)
{
_pgResult = NULL;
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"cannot set date style to ISO."];
}
@ -257,7 +257,7 @@ pgResultDictionary(PGresult *pgResult)
//OK
NSAssert(!_pgConn, @"Channel already opened");
_pgConn = [(PostgresAdaptor *)[[self adaptorContext] adaptor] newPGconn];
_pgConn = [(PostgreSQLAdaptor *)[[self adaptorContext] adaptor] newPGconn];
if (_pgConn)
{
@ -272,7 +272,7 @@ pgResultDictionary(PGresult *pgResult)
NSAssert(_pgConn, @"Channel not opened");
[self _cancelResults];
[(PostgresAdaptor *)[[self adaptorContext] adaptor] releasePGconn: _pgConn
[(PostgreSQLAdaptor *)[[self adaptorContext] adaptor] releasePGconn: _pgConn
force: NO];
_pgConn = NULL;
}
@ -434,7 +434,7 @@ zone:zone
NSDebugMLog(@"_attributes=%@", _attributes);
NSDebugMLog(@"result=%@", [self lowLevelResultFieldNames:
_pgResult]);
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"attempt to read %d attributes "
@"when the result set has only %d columns",
count, PQnfields(_pgResult)];
@ -472,7 +472,7 @@ zone:zone
string = [self _readBinaryDataRow: (Oid)atol(string)
length:&length zone: zone];
//For efficiency reasons, the returned value is NOT autoreleased !
values[i] = PSQLA_PostgresValues_newValueForBytesLengthAttribute(string,length,attr);
values[i] = PSQLA_PostgreSQLValues_newValueForBytesLengthAttribute(string,length,attr);
}
else
{
@ -490,7 +490,7 @@ zone:zone
else
{
//For efficiency reasons, the returned value is NOT autoreleased !
values[i] = PSQLA_PostgresValues_newValueForBytesLengthAttribute(string,length,attr);
values[i] = PSQLA_PostgreSQLValues_newValueForBytesLengthAttribute(string,length,attr);
}
}
@ -575,7 +575,7 @@ zone:zone
[_sqlExpression statement], errorString);
NSDebugMLLog(@"SQL expression '%@' caused %@",
[_sqlExpression statement], errorString);
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"unexpected result returned by PQresultStatus(): %@",errorString];
EOFLOGObjectFnStop();
@ -590,7 +590,7 @@ zone:zone
[_sqlExpression statement], status, errorString);
NSDebugMLLog(@"SQL expression '%@' returned status %d: %@",
[_sqlExpression statement], status, errorString);
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"unexpected result returned by PQresultStatus(): status %d: %@",
status,errorString];
@ -640,7 +640,7 @@ zone:zone
message = [NSString stringWithFormat:
@"Command status %@. Returned %d rows with %d columns ",
message, PQntuples(_pgResult), PQnfields(_pgResult)];
NSLog (@"PostgresAdaptor: %@", message);
NSLog (@"PostgreSQLAdaptor: %@", message);
}
NSDebugMLLog(@"gsdb", @"ret=%s", (ret ? "YES" : "NO"));
@ -665,11 +665,11 @@ zone:zone
// NSDebugMLLog(@"gsdb",@"EE _origAttributes=%@",_origAttributes);
// NSDebugMLLog(@"gsdb",@"EE _attributes=%@",_attributes);
NSDebugMLLog(@"gsdb", @"PostgresAdaptor: execute command:\n%@\n",
NSDebugMLLog(@"gsdb", @"PostgreSQLAdaptor: execute command:\n%@\n",
[expression statement]);
if ([self isDebugEnabled] == YES)
NSLog(@"PostgresAdaptor: execute command:\n%@\n",
NSLog(@"PostgreSQLAdaptor: execute command:\n%@\n",
[expression statement]);
//call PostgreSQLChannel numberOfAffectedRows
/* Send the expression to the SQL server */
@ -682,7 +682,7 @@ zone:zone
if ([self isDebugEnabled])
{
adaptorContext = [self adaptorContext];
[(PostgresAdaptor *)[adaptorContext adaptor]
[(PostgreSQLAdaptor *)[adaptorContext adaptor]
privateReportError: _pgConn];
}
}
@ -704,12 +704,12 @@ zone:zone
- (void)evaluateExpression: (EOSQLExpression *)expression // OK quasi
{
PostgresContext *adaptorContext = nil;
PostgreSQLContext *adaptorContext = nil;
EOFLOGObjectFnStart();
//_evaluationIsDirectCalled=1
adaptorContext = (PostgresContext *)[self adaptorContext];
adaptorContext = (PostgreSQLContext *)[self adaptorContext];
//call expression statement
//call adaptorContext adaptor
//call adaptor databaseEncoding
@ -729,7 +729,7 @@ zone:zone
}
if ([self isOpen] == NO)
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"cannot execute SQL expression. Channel is not opened."];
[self _cancelResults];
@ -764,7 +764,7 @@ zone:zone
NSMutableDictionary *nrow = nil;
NSEnumerator *enumerator = nil;
NSString *attrName = nil;
PostgresContext *adaptorContext = nil;
PostgreSQLContext *adaptorContext = nil;
IMP attrEnumNO=NULL; // nextObject
IMP rowOFK=NULL; // objectForKey:
IMP nrowSOFK=NULL; // setObject:forKey:
@ -799,7 +799,7 @@ zone:zone
nrow = AUTORELEASE([row mutableCopy]);
adaptorContext = (PostgresContext *)[self adaptorContext];
adaptorContext = (PostgreSQLContext *)[self adaptorContext];
[self _cancelResults]; //No done by WO
@ -877,7 +877,7 @@ each key
{
EOSQLExpression *sqlexpr = nil;
unsigned long rows = 0;
PostgresContext *adaptorContext;
PostgreSQLContext *adaptorContext;
EOFLOGObjectFnStart();
@ -903,7 +903,7 @@ each key
NSStringFromClass([self class]),
self];
adaptorContext = (PostgresContext *)[self adaptorContext];
adaptorContext = (PostgreSQLContext *)[self adaptorContext];
[self _cancelResults];
[_adaptorContext autoBeginTransaction: NO];
@ -1044,7 +1044,7 @@ each key
NSString *attrName = nil;
NSString *externalType = nil;
EOAttribute *attr = nil;
PostgresContext *adaptorContext = nil;
PostgreSQLContext *adaptorContext = nil;
unsigned long rows = 0;
IMP valuesOFK=NULL; // objectForKey:
@ -1098,7 +1098,7 @@ each key
}
[self _cancelResults]; //Not in WO
adaptorContext = (PostgresContext *)[self adaptorContext];
adaptorContext = (PostgreSQLContext *)[self adaptorContext];
[adaptorContext autoBeginTransaction: YES];
if ([invAttributes count])
@ -1194,7 +1194,7 @@ each key
fd = lo_open(_pgConn, oid, INV_READ|INV_WRITE);
if (fd < 0)
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"cannot open large object Oid = %ld", oid];
lo_lseek(_pgConn, fd, 0, SEEK_END);
@ -1202,7 +1202,7 @@ each key
lo_lseek(_pgConn, fd, 0, SEEK_SET);
if (len < 0)
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"error while getting size of large object Oid = %ld", oid];
bytes = NSZoneMalloc(zone, len);
@ -1211,7 +1211,7 @@ each key
if (len != wrt)
{
NSZoneFree(zone, bytes);
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"error while reading large object Oid = %ld", oid];
}
lo_close(_pgConn, fd);
@ -1237,18 +1237,18 @@ each key
oid = lo_creat(_pgConn, INV_READ|INV_WRITE);
if (oid == 0)
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"cannot create large object"];
fd = lo_open(_pgConn, oid, INV_READ|INV_WRITE);
if (fd < 0)
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"cannot open large object Oid = %ld", oid];
wrt = lo_write(_pgConn, fd, (char *)bytes, len);
if (len != wrt)
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"error while writing large object Oid = %ld", oid];
lo_close(_pgConn, fd);
@ -1274,18 +1274,18 @@ each key
oid = lo_creat(_pgConn, INV_READ|INV_WRITE);
if (oid == 0)
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"cannot create large object"];
fd = lo_open(_pgConn, oid, INV_READ|INV_WRITE);
if (fd < 0)
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"cannot open large object Oid = %ld", oid];
wrt = lo_write(_pgConn, fd, (char*)bytes, len);
if (len != wrt)
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"error while writing large object Oid = %ld", oid];
lo_close(_pgConn, fd);
@ -1305,7 +1305,7 @@ each key
if (_pgResult == NULL || PQresultStatus(_pgResult) != PGRES_TUPLES_OK)
{
_pgResult = NULL;
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"cannot read type name informations from database. "
@"bad response from server"];
}
@ -1313,7 +1313,7 @@ each key
if (PQnfields(_pgResult) != 2)
{
_pgResult = NULL;
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"cannot read type name informations from database. "
@"results should have two columns"];
}
@ -1344,7 +1344,7 @@ each key
if (_pgResult == NULL || PQresultStatus(_pgResult) != PGRES_TUPLES_OK)
{
_pgResult = NULL;
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"cannot read type name informations from database. "
@"bad response from server"];
}
@ -1364,7 +1364,7 @@ each key
- (void)setAttributesToFetch: (NSArray *)attributes
{
//call adaptorContext
NSDebugMLLog(@"gsdb", @"PostgresChannel: setAttributesToFetch %p:%@",
NSDebugMLLog(@"gsdb", @"PostgreSQLChannel: setAttributesToFetch %p:%@",
attributes, attributes);
ASSIGN(_attributes, attributes);
@ -1440,7 +1440,7 @@ each key
&oidToTypeNameOFK,externalTypeNumber);
if (!externalType)
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"cannot find type for Oid = %d",
PQftype(_pgResult, i)];
@ -1529,7 +1529,7 @@ each key
|| PQresultStatus(_pgResult) != PGRES_TUPLES_OK)
{
_pgResult = NULL;
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"cannot read list of tables from database. "
@"bad response from server"];
}
@ -1579,13 +1579,13 @@ each key
stmt = [NSS_SWF: @"SELECT oid FROM pg_class "
@"WHERE relname = '%@' AND relkind = 'r'",tableName];
EOAdaptorDebugLog(@"PostgresAdaptor: execute command:\n%@", stmt);
EOAdaptorDebugLog(@"PostgreSQLAdaptor: execute command:\n%@", stmt);
_pgResult = PQexec(_pgConn, [stmt cString]);
if (_pgResult == NULL || PQresultStatus(_pgResult) != PGRES_TUPLES_OK)
{
_pgResult = NULL;
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"cannot read type name information from database."
@"bad response from server"];
}
@ -1593,7 +1593,7 @@ each key
if (PQntuples(_pgResult) != 1)
{
_pgResult = NULL;
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"Table %@ doesn't exist", tableName];
}
@ -1605,7 +1605,7 @@ each key
@"WHERE attnum > 0 AND attrelid=%@"
@"AND attisdropped IS FALSE", tableOid];
EOAdaptorDebugLog(@"PostgresAdaptor: execute command:\n%@", stmt);
EOAdaptorDebugLog(@"PostgreSQLAdaptor: execute command:\n%@", stmt);
PQclear(_pgResult);
_pgResult = PQexec(_pgConn, [stmt cString]);
@ -1682,7 +1682,7 @@ each key
@"WHERE indrelid='%@' AND indisprimary = 't'",
tableOid];
EOAdaptorDebugLog(@"PostgresAdaptor: execute command:\n%@", stmt);
EOAdaptorDebugLog(@"PostgreSQLAdaptor: execute command:\n%@", stmt);
_pgResult = PQexec(_pgConn,[stmt cString]);
if (PQntuples(_pgResult))
{
@ -1696,7 +1696,7 @@ each key
tableOid, pkAttNum];
PQclear(_pgResult);
EOAdaptorDebugLog(@"PostgresAdaptor: execute command:\n%@", stmt);
EOAdaptorDebugLog(@"PostgreSQLAdaptor: execute command:\n%@", stmt);
_pgResult = PQexec(_pgConn,[stmt cString]);
if (PQntuples(_pgResult))
@ -1747,7 +1747,7 @@ each key
PQclear(_pgResult);
EOAdaptorDebugLog(@"PostgresAdaptor: execute command:\n%@", stmt);
EOAdaptorDebugLog(@"PostgreSQLAdaptor: execute command:\n%@", stmt);
_pgResult = PQexec(_pgConn, [stmt cString]);
for (i = 0, n = PQntuples(_pgResult); i < n; i++)
@ -1982,7 +1982,7 @@ each key
EOFLOGObjectFnStart();
primaryKeySequenceNameFormat
= [(PostgresContext*)[self adaptorContext] primaryKeySequenceNameFormat];
= [(PostgreSQLContext*)[self adaptorContext] primaryKeySequenceNameFormat];
NSAssert(primaryKeySequenceNameFormat, @"No primary sequence name format");
expr = AUTORELEASE([[[_adaptorContext adaptor] expressionClass] new]);
@ -2012,7 +2012,7 @@ each key
length = PQgetlength(_pgResult, _currentResultRow, 0);
attr = [_pkAttributeArray objectAtIndex: 0];
pkValue = AUTORELEASE(PSQLA_PostgresValues_newValueForBytesLengthAttribute(string,length,attr));
pkValue = AUTORELEASE(PSQLA_PostgreSQLValues_newValueForBytesLengthAttribute(string,length,attr));
NSAssert(pkValue, @"no pk value");
key = [[entity primaryKeyAttributeNames] objectAtIndex: 0];
@ -2032,11 +2032,11 @@ each key
- (void)cleanupFetch
{
PostgresContext *adaptorContext;
PostgreSQLContext *adaptorContext;
EOFLOGObjectFnStart();
adaptorContext = (PostgresContext *)[self adaptorContext];
adaptorContext = (PostgreSQLContext *)[self adaptorContext];
NSDebugMLog(@"[self isFetchInProgress]=%s",
([self isFetchInProgress] ? "YES" : "NO"));
@ -2055,4 +2055,4 @@ each key
EOFLOGObjectFnStop();
}
@end /* PostgresChannel */
@end /* PostgreSQLChannel */

View file

@ -1,5 +1,5 @@
/**
PostgresCompatibility.h
PostgreSQLCompatibility.h
Copyright (C) 2004,2005 Free Software Foundation, Inc.

View file

@ -1,12 +1,12 @@
/*
PostgresContext.h
PostgreSQLContext.h
Copyright (C) 2000,2002,2003,2005 Free Software Foundation, Inc.
Author: Mirko Viviani <mirko.viviani@gmail.com>
Date: February 2000
based on the Postgres adaptor written by
based on the PostgreSQL adaptor written by
Mircea Oancea <mircea@jupiter.elcom.pub.ro>
This file is part of the GNUstep Database Library.
@ -27,14 +27,14 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __PostgresContext_h__
#define __PostgresContext_h__
#ifndef __PostgreSQLContext_h__
#define __PostgreSQLContext_h__
#include <EOAccess/EOAdaptorContext.h>
#include <PostgresEOAdaptor/PostgresAdaptor.h>
#include <PostgreSQLEOAdaptor/PostgreSQLAdaptor.h>
@interface PostgresContext : EOAdaptorContext
@interface PostgreSQLContext : EOAdaptorContext
{
NSString* _primaryKeySequenceNameFormat;
struct
@ -68,4 +68,4 @@
@end
#endif /* __PostgresContext_h__ */
#endif /* __PostgreSQLContext_h__ */

View file

@ -1,12 +1,12 @@
/**
PostgresContext.m <title>PostgresContext</title>
PostgreSQLContext.m <title>PostgreSQLContext</title>
Copyright (C) 2000-2002,2003,2004,2005 Free Software Foundation, Inc.
Author: Mirko Viviani <mirko.viviani@gmail.com>
Date: February 2000
based on the Postgres adaptor written by
based on the PostgreSQL adaptor written by
Mircea Oancea <mircea@jupiter.elcom.pub.ro>
Author: Manuel Guesdon <mguesdon@orange-concept.com>
@ -58,13 +58,13 @@ RCS_ID("$Id$")
#include <EOControl/EODebug.h>
#include <PostgresEOAdaptor/PostgresAdaptor.h>
#include <PostgresEOAdaptor/PostgresContext.h>
#include <PostgresEOAdaptor/PostgresChannel.h>
#include <PostgresEOAdaptor/PostgresSQLExpression.h>
#include <PostgreSQLEOAdaptor/PostgreSQLAdaptor.h>
#include <PostgreSQLEOAdaptor/PostgreSQLContext.h>
#include <PostgreSQLEOAdaptor/PostgreSQLChannel.h>
#include <PostgreSQLEOAdaptor/PostgreSQLExpression.h>
@implementation PostgresContext
@implementation PostgreSQLContext
- (id)initWithAdaptor: (EOAdaptor *)adaptor
{
@ -72,7 +72,7 @@ RCS_ID("$Id$")
{
if (adaptor)
[self setPrimaryKeySequenceNameFormat:
[(PostgresAdaptor*)adaptor primaryKeySequenceNameFormat]];
[(PostgreSQLAdaptor*)adaptor primaryKeySequenceNameFormat]];
}
return self;
@ -80,7 +80,7 @@ RCS_ID("$Id$")
- (void)beginTransaction
{
PostgresChannel *channel = nil;
PostgreSQLChannel *channel = nil;
EOFLOGObjectFnStart();
@ -94,7 +94,7 @@ RCS_ID("$Id$")
if (_delegateRespondsTo.shouldBegin)
{
if (![_delegate adaptorContextShouldBegin: self])
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"%@ -- %@ 0x%x: delegate refuses",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
@ -104,7 +104,7 @@ RCS_ID("$Id$")
channel = [[_channels objectAtIndex: 0] nonretainedObjectValue];
if ([channel isOpen] == NO)
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"cannot execute SQL expression. Channel is not opened."];
_flags.didBegin = YES;
@ -148,7 +148,7 @@ RCS_ID("$Id$")
if (_delegateRespondsTo.shouldCommit)
{
if (![_delegate adaptorContextShouldCommit: self])
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"%@ -- %@ 0x%x: delegate refuses",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
@ -196,7 +196,7 @@ RCS_ID("$Id$")
if (_delegateRespondsTo.shouldRollback)
{
if (![_delegate adaptorContextShouldRollback: self])
[NSException raise: PostgresException
[NSException raise: PostgreSQLException
format: @"%@ -- %@ 0x%x: delegate refuses",
NSStringFromSelector(_cmd),
NSStringFromClass([self class]),
@ -233,7 +233,7 @@ RCS_ID("$Id$")
//OK
EOAdaptorChannel *adaptorChannel;
adaptorChannel = [PostgresChannel adaptorChannelWithAdaptorContext: self];
adaptorChannel = [PostgreSQLChannel adaptorChannelWithAdaptorContext: self];
return adaptorChannel;
}
@ -320,7 +320,7 @@ RCS_ID("$Id$")
return _primaryKeySequenceNameFormat;
}
@end /* PostgresContext */
@end /* PostgreSQLContext */
/*
//TODO
autoCommitTransaction

View file

@ -2,7 +2,7 @@
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.7//EN" "http://www.gnustep.org/gsdoc-0_6_7.xml">
<gsdoc base="index">
<head>
<title>GDL2 Postgres Adaptor</title>
<title>GDL2 PostgreSQL Adaptor</title>
<author name="Mirko Viviani">
<email address="mirko.viviani@gmail.com"/>
<url url="http://www.gnustep.org/developers/whoiswho.html"/></author>
@ -12,7 +12,7 @@
</head>
<body>
<chapter>
<heading>GDL2 Postgres Adaptor</heading>
<heading>GDL2 PostgreSQL Adaptor</heading>
<p>...
</p>
</chapter>

View file

@ -1,5 +1,5 @@
/*
PostgresSQLExpression.h
PostgreSQLExpression.h
Copyright (C) 2000,2002,2003,2004,2005 Free Software Foundation, Inc.
@ -24,8 +24,8 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __PostgresSQLExpression_h__
#define __PostgresSQLExpression_h__
#ifndef __PostgreSQLExpression_h__
#define __PostgreSQLExpression_h__
#include <EOAccess/EOSQLExpression.h>
@ -33,7 +33,7 @@
@class NSString;
@interface PostgresSQLExpression : EOSQLExpression
@interface PostgreSQLExpression : EOSQLExpression
+ (NSString *)formatValue: (id)value
forAttribute: (EOAttribute *)attribute;
@ -53,4 +53,4 @@
@end
#endif /* __PostgresSQLExpression_h__ */
#endif /* __PostgreSQLExpression_h__ */

View file

@ -1,5 +1,5 @@
/**
PostgresSQLExpression.m <title>PostgresSQLExpression</title>
PostgreSQLExpression.m <title>PostgreSQLExpression</title>
Copyright (C) 2000-2002,2003,2004,2005 Free Software Foundation, Inc.
@ -61,12 +61,12 @@ RCS_ID("$Id$")
#include <EOAccess/EOModel.h>
#include <EOAccess/EOSchemaGeneration.h>
#include "PostgresSQLExpression.h"
#include "PostgresAdaptor.h"
#include "PostgresValues.h"
#include "PostgreSQLExpression.h"
#include "PostgreSQLAdaptor.h"
#include "PostgreSQLValues.h"
#include "PostgresCompatibility.h"
#include "PostgresPrivate.h"
#include "PostgreSQLCompatibility.h"
#include "PostgreSQLPrivate.h"
/* These methods are undocumented but exist in GDL2 and WO4.5.
Ayers: Review (Don't rely on them) */
@ -80,7 +80,7 @@ RCS_ID("$Id$")
@end
@implementation PostgresSQLExpression
@implementation PostgreSQLExpression
+ (void) initialize
{
@ -776,7 +776,7 @@ RCS_ID("$Id$")
return finalEntitiesString;
}
// Postgres like seems buggy:
// PostgreSQL like seems buggy:
// see http://www.postgresql.org/docs/7.4/interactive/functions-matching.html
// for exemple "ab" doesn't match [_]b
@ -839,7 +839,7 @@ RCS_ID("$Id$")
p = s+1;
}
break;
/*Postgresql doesn't want [_] but want _
/*PostgreSQLql doesn't want [_] but want _
case '_':
if (s != p)
(*appendStringIMP)(str,@selector(appendString:),
@ -927,7 +927,7 @@ RCS_ID("$Id$")
p = s+1;
}
break;
/*Postgresql doesn't want [_] but want _
/*PostgreSQLql doesn't want [_] but want _
case '_':
if (s != p)
PSQLA_AppendStringWithImp(str,appendStringIMP,

View file

@ -1,5 +1,5 @@
/* -*-objc-*-
PostgresPrivate.h
PostgreSQLPrivate.h
Copyright (C) 2005 Free Software Foundation, Inc.
@ -24,8 +24,8 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __PostgresPrivate_h__
#define __PostgresPrivate_h__
#ifndef __PostgreSQLPrivate_h__
#define __PostgreSQLPrivate_h__
@class NSNumber;
@class EONull;
@ -38,7 +38,7 @@ extern Class PSQLA_NSCalendarDateClass;
extern Class PSQLA_NSDateClass;
extern Class PSQLA_NSMutableArrayClass;
extern Class PSQLA_EOAttributeClass;
extern Class PSQLA_PostgresValuesClass;
extern Class PSQLA_PostgreSQLValuesClass;
// ==== IMPs ====
extern IMP PSQLA_NSNumber_allocWithZoneIMP;
@ -47,7 +47,7 @@ extern IMP PSQLA_NSString_allocWithZoneIMP;
extern IMP PSQLA_NSCalendarDate_allocWithZoneIMP;
extern IMP PSQLA_NSMutableArray_allocWithZoneIMP;
extern IMP PSQLA_EOAttribute_allocWithZoneIMP;
extern IMP PSQLA_PostgresValues_newValueForBytesLengthAttributeIMP;
extern IMP PSQLA_PostgreSQLValues_newValueForBytesLengthAttributeIMP;
// ==== Constants ====
extern NSNumber *PSQLA_NSNumberBool_Yes;
@ -71,12 +71,12 @@ _isNilOrEONull(id obj)
return (obj == nil || obj == PSQLA_EONull) ? YES : NO;
}
// ---- PostgresValues newValueForBytes:length:attribute ----
#define PSQLA_PostgresValues_newValueForBytesLengthAttribute(bytes, \
// ---- PostgreSQLValues newValueForBytes:length:attribute ----
#define PSQLA_PostgreSQLValues_newValueForBytesLengthAttribute(bytes, \
length, \
attribute) \
(*PSQLA_PostgresValues_newValueForBytesLengthAttributeIMP) \
(PSQLA_PostgresValuesClass, \
(*PSQLA_PostgreSQLValues_newValueForBytesLengthAttributeIMP) \
(PSQLA_PostgreSQLValuesClass, \
@selector(newValueForBytes:length:attribute:), \
(bytes), (length), (attribute))
@ -159,5 +159,5 @@ PSQLA_SetObjectForKeyWithImpPtr(id object,IMP* impPtr,id value, id key)
(PSQLA_##CLASS_NAME##Class,@selector(allocWithZone:),NULL)
#endif /* __PostgresPrivate_h__ */
#endif /* __PostgreSQLPrivate_h__ */

View file

@ -1,5 +1,5 @@
/**
PostgresPrivate.m <title>PostgresPrivate: various definitions</title>
PostgreSQLPrivate.m <title>PostgreSQLPrivate: various definitions</title>
Copyright (C) 2005 Free Software Foundation, Inc.
@ -44,7 +44,7 @@ RCS_ID("$Id$")
#include <EOControl/EONull.h>
#include <EOAccess/EOAttribute.h>
#include "PostgresValues.h"
#include "PostgreSQLValues.h"
// ==== Classes ====
Class PSQLA_NSStringClass=Nil;
@ -54,7 +54,7 @@ Class PSQLA_NSCalendarDateClass=Nil;
Class PSQLA_NSDateClass=Nil;
Class PSQLA_NSMutableArrayClass;
Class PSQLA_EOAttributeClass=Nil;
Class PSQLA_PostgresValuesClass=Nil;
Class PSQLA_PostgreSQLValuesClass=Nil;
// ==== IMPs ====
IMP PSQLA_NSNumber_allocWithZoneIMP=NULL;
@ -63,7 +63,7 @@ IMP PSQLA_NSString_allocWithZoneIMP=NULL;
IMP PSQLA_NSCalendarDate_allocWithZoneIMP=NULL;
IMP PSQLA_NSMutableArray_allocWithZoneIMP=NULL;
IMP PSQLA_EOAttribute_allocWithZoneIMP=NULL;
IMP PSQLA_PostgresValues_newValueForBytesLengthAttributeIMP=NULL;
IMP PSQLA_PostgreSQLValues_newValueForBytesLengthAttributeIMP=NULL;
// ==== Constants ====
NSNumber *PSQLA_NSNumberBool_Yes=nil;
@ -90,7 +90,7 @@ PSQLA_PrivInit(void)
PSQLA_NSCalendarDateClass=[NSCalendarDate class];
PSQLA_NSDateClass=[NSDate class];
PSQLA_EOAttributeClass = [EOAttribute class];
PSQLA_PostgresValuesClass = [PostgresValues class];
PSQLA_PostgreSQLValuesClass = [PostgreSQLValues class];
// ==== IMPs ====
PSQLA_NSNumber_allocWithZoneIMP=
@ -111,8 +111,8 @@ PSQLA_PrivInit(void)
PSQLA_EOAttribute_allocWithZoneIMP=
[PSQLA_EOAttributeClass methodForSelector:@selector(allocWithZone:)];
PSQLA_PostgresValues_newValueForBytesLengthAttributeIMP=
[PSQLA_PostgresValuesClass methodForSelector:@selector(newValueForBytes:length:attribute:)];
PSQLA_PostgreSQLValues_newValueForBytesLengthAttributeIMP=
[PSQLA_PostgreSQLValuesClass methodForSelector:@selector(newValueForBytes:length:attribute:)];
// ==== Constants ====
ASSIGN(PSQLA_NSNumberBool_Yes,[PSQLA_NSNumberClass numberWithBool:YES]);

View file

@ -1,5 +1,5 @@
/*
PostgresValues.h
PostgreSQLValues.h
Copyright (C) 2000,2002,2003,2004,2005 Free Software Foundation, Inc.
@ -24,8 +24,8 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __PostgresValues_h__
#define __PostgresValues_h__
#ifndef __PostgreSQLValues_h__
#define __PostgreSQLValues_h__
#ifdef GNUSTEP
#include <Foundation/NSString.h>
@ -38,10 +38,10 @@
#endif
@class EOAttribute;
@class PostgresChannel;
@class PostgreSQLChannel;
@interface PostgresValues:NSObject
@interface PostgreSQLValues:NSObject
{
}
@ -68,4 +68,4 @@
@end
#endif /* __PostgresValues_h__ */
#endif /* __PostgreSQLValues_h__ */

View file

@ -1,5 +1,5 @@
/**
PostgresValues.m
PostgreSQLValues.m
Copyright (C) 2000-2002,2003,2004,2005 Free Software Foundation, Inc.
@ -55,12 +55,12 @@ RCS_ID("$Id$")
#include <EOAccess/EOAttribute.h>
#include "PostgresEOAdaptor/PostgresAdaptor.h"
#include "PostgresEOAdaptor/PostgresChannel.h"
#include "PostgresEOAdaptor/PostgresValues.h"
#include "PostgreSQLEOAdaptor/PostgreSQLAdaptor.h"
#include "PostgreSQLEOAdaptor/PostgreSQLChannel.h"
#include "PostgreSQLEOAdaptor/PostgreSQLValues.h"
#include "PostgresCompatibility.h"
#include "PostgresPrivate.h"
#include "PostgreSQLCompatibility.h"
#include "PostgreSQLPrivate.h"
#include <stdlib.h>
@ -77,7 +77,7 @@ static NSStringEncoding LPSQLA_StringDefaultCStringEncoding;
- (char)_valueTypeChar;
@end
@implementation PostgresValues
@implementation PostgreSQLValues
+ (void) initialize
{
@ -126,7 +126,7 @@ static NSStringEncoding LPSQLA_StringDefaultCStringEncoding;
/**
For efficiency reasons, the returned value is NOT autoreleased !
bytes is null terminated (cf Postgresql doc) and length is equivalent
bytes is null terminated (cf PostgreSQLql doc) and length is equivalent
to strlen(bytes)
**/
+ (id)newValueForNumberType: (const void *)bytes
@ -290,18 +290,18 @@ For efficiency reasons, the returned value is NOT autoreleased !
@end
/*
@implementation NSString (PostgresValueCreation)
@implementation NSString (PostgreSQLValueCreation)
For efficiency reasons, the returned value is NOT autoreleased !
- stringValueForPostgresType:(NSString*)type
- stringValueForPostgreSQLType:(NSString*)type
attribute:(EOAttribute*)attribute
{
if ([type isEqual:@"bytea"])
return [[NSData alloc]initWithBytes:[self cString]
length:[self cStringLength]]
stringValueForPostgresType:type
stringValueForPostgreSQLType:type
attribute:attribute];
else
return [[[[EOQuotedExpression alloc]
@ -313,13 +313,13 @@ if ([type isEqual:@"bytea"])
return nil;
}
@end // NSString (PostgresValueCreation)
@end // NSString (PostgreSQLValueCreation)
@implementation NSNumber (PostgresValueCreation)
@implementation NSNumber (PostgreSQLValueCreation)
- stringValueForPostgresType:(NSString*)type
- stringValueForPostgreSQLType:(NSString*)type
attribute:(EOAttribute*)attribute;
{
if ([[attribute externalType] isEqualToString:@"bool"])
@ -328,13 +328,13 @@ if ([type isEqual:@"bytea"])
return [self description];
}
@end // NSNumber (PostgresValueCreation)
@end // NSNumber (PostgreSQLValueCreation)
@implementation NSData (PostgresValueCreation)
@implementation NSData (PostgreSQLValueCreation)
- stringValueForPostgresType:(NSString*)type
- stringValueForPostgreSQLType:(NSString*)type
attribute:(EOAttribute*)attribute
{
if ([[attribute externalType] isEqualToString:@"bytea"]) {
@ -366,14 +366,14 @@ if ([type isEqual:@"bytea"])
}
return [[NSString stringWithCString:[self bytes] length:[self length]]
stringValueForPostgresType:type attribute:attribute];
stringValueForPostgreSQLType:type attribute:attribute];
}
@end // NSData (PostgresValueCreation)
@end // NSData (PostgreSQLValueCreation)
*/
@implementation NSCalendarDate (PostgresValueCreation)
@implementation NSCalendarDate (PostgreSQLValueCreation)
+ (NSString*)postgresFormat
{
@ -382,13 +382,13 @@ if ([type isEqual:@"bytea"])
return PSQLA_postgresCalendarFormat;
}
@end // NSCalendarDate (PostgresValueCreation)
@end // NSCalendarDate (PostgreSQLValueCreation)
/*
@implementation EONull (PostgresValueCreation)
@implementation EONull (PostgreSQLValueCreation)
- stringValueForPostgresType:(NSString*)type
- stringValueForPostgreSQLType:(NSString*)type
attribute:(EOAttribute*)attribute
{
return @"NULL";
@ -397,25 +397,25 @@ if ([type isEqual:@"bytea"])
@end
@implementation NSObject (PostgresValueCreation)
@implementation NSObject (PostgreSQLValueCreation)
- stringValueForPostgresType:(NSString*)type
- stringValueForPostgreSQLType:(NSString*)type
attribute:(EOAttribute*)attribute
{
if ([self respondsToSelector:@selector(stringForType:)])
return [[self stringForType:[attribute valueType]]
stringValueForPostgresType:type attribute:attribute];
stringValueForPostgreSQLType:type attribute:attribute];
else if ([self respondsToSelector:@selector(dataForType:)])
return [[self dataForType:[attribute valueType]]
stringValueForPostgresType:type attribute:attribute];
stringValueForPostgreSQLType:type attribute:attribute];
else
THROW([[DataTypeMappingNotSupportedException alloc]
initWithFormat:@"Postgres cannot map value class %@ "
initWithFormat:@"PostgreSQL cannot map value class %@ "
@"because its instances does not responds to either "
@" `stringForType:' or `dataForType:'. ",
NSStringFromClass([self class])]);
return nil;
}
@end // NSObject (PostgresValueCreation)
@end // NSObject (PostgreSQLValueCreation)
*/

63
configure vendored
View file

@ -718,13 +718,13 @@ echo X"$0" |
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
srcdir=$ac_confdir
if test ! -r "$srcdir/$ac_unique_file"; then
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
if test ! -r "$srcdir/$ac_unique_file"; then
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
{ echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
{ (exit 1); exit 1; }; }
@ -733,7 +733,7 @@ if test ! -r "$srcdir/$ac_unique_file"; then
{ (exit 1); exit 1; }; }
fi
fi
(cd $srcdir && test -r "./$ac_unique_file") 2>/dev/null ||
(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
{ echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
{ (exit 1); exit 1; }; }
srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
@ -947,7 +947,7 @@ esac
else
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi
cd $ac_popdir
cd "$ac_popdir"
done
fi
@ -1877,8 +1877,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -1936,8 +1935,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -2053,8 +2051,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -2108,8 +2105,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -2154,8 +2150,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -2199,8 +2194,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -2523,8 +2517,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -2694,8 +2687,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -2835,8 +2827,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -2984,8 +2975,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3072,8 +3062,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3146,8 +3135,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@ -3198,7 +3186,7 @@ fi
if test $enable_pgsql = yes; then
EOADAPTORS="$EOADAPTORS Postgres95"
EOADAPTORS="$EOADAPTORS PostgreSQL"
HAVE_PGSQL=1
# AC_DEFINE(HAVE_LIBXML,1,
@ -3244,7 +3232,7 @@ echo "${ECHO_T}$VERSION" >&6
#--------------------------------------------------------------------
# Write the Makefiles
#--------------------------------------------------------------------
ac_config_files="$ac_config_files gdl2.make GNUmakefile EOAdaptors/GNUmakefile EOAdaptors/Postgres95/GNUmakefile EOAdaptors/Postgres95/config.mak"
ac_config_files="$ac_config_files gdl2.make GNUmakefile EOAdaptors/GNUmakefile EOAdaptors/PostgreSQL/GNUmakefile EOAdaptors/PostgreSQL/config.mak"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@ -3773,8 +3761,8 @@ do
"gdl2.make" ) CONFIG_FILES="$CONFIG_FILES gdl2.make" ;;
"GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
"EOAdaptors/GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES EOAdaptors/GNUmakefile" ;;
"EOAdaptors/Postgres95/GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES EOAdaptors/Postgres95/GNUmakefile" ;;
"EOAdaptors/Postgres95/config.mak" ) CONFIG_FILES="$CONFIG_FILES EOAdaptors/Postgres95/config.mak" ;;
"EOAdaptors/PostgreSQL/GNUmakefile" ) CONFIG_FILES="$CONFIG_FILES EOAdaptors/PostgreSQL/GNUmakefile" ;;
"EOAdaptors/PostgreSQL/config.mak" ) CONFIG_FILES="$CONFIG_FILES EOAdaptors/PostgreSQL/config.mak" ;;
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@ -4045,11 +4033,6 @@ esac
if test x"$ac_file" != x-; then
{ echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
@ -4088,6 +4071,12 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
fi;;
esac
done` || { (exit 1); exit 1; }
if test x"$ac_file" != x-; then
{ echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
sed "$ac_vpsub

View file

@ -39,7 +39,7 @@ AC_CONFIG_HEADER(config.h)
AM_PATH_PGSQL(enable_pgsql=yes, enable_pgsql=no)
if test $enable_pgsql = yes; then
EOADAPTORS="$EOADAPTORS Postgres95"
EOADAPTORS="$EOADAPTORS PostgreSQL"
HAVE_PGSQL=1
# AC_DEFINE(HAVE_LIBXML,1,
@ -79,5 +79,5 @@ AC_SUBST(GCC_VERSION)
#--------------------------------------------------------------------
# Write the Makefiles
#--------------------------------------------------------------------
AC_CONFIG_FILES([gdl2.make GNUmakefile EOAdaptors/GNUmakefile EOAdaptors/Postgres95/GNUmakefile EOAdaptors/Postgres95/config.mak])
AC_CONFIG_FILES([gdl2.make GNUmakefile EOAdaptors/GNUmakefile EOAdaptors/PostgreSQL/GNUmakefile EOAdaptors/PostgreSQL/config.mak])
AC_OUTPUT