Skip to content

Commit

Permalink
Fix definition of PostgreSQL Oid from Integer to Cardinal, as it is i…
Browse files Browse the repository at this point in the history
…n postgres_ext.h . Should fix negative Oids in TPGQuery.TableName. See https://www.heidisql.com/forum.php?t=34819
  • Loading branch information
ansgarbecker committed Oct 27, 2019
1 parent b2b416d commit ffb6170
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions source/dbconnection.pas
Expand Up @@ -86,7 +86,7 @@ TDBObjectDropComparer = class(TComparer<TDBObject>)
// General purpose editing status flag
TEditingStatus = (esUntouched, esModified, esDeleted, esAddedUntouched, esAddedModified, esAddedDeleted);

TIntStringPairs = TDictionary<Integer, String>;
TOidStringPairs = TDictionary<POid, String>;

TColumnDefaultType = (cdtNothing, cdtText, cdtNull, cdtAutoInc, cdtExpression);

Expand Down Expand Up @@ -347,7 +347,7 @@ TDBConnection = class(TComponent)
FKeepAliveTimer: TTimer;
FFavorites: TStringList;
FPrefetchResults: TDBQueryList;
FRegClasses: TIntStringPairs;
FRegClasses: TOidStringPairs;
procedure SetActive(Value: Boolean); virtual; abstract;
procedure DoBeforeConnect; virtual;
procedure DoAfterConnect; virtual;
Expand Down Expand Up @@ -459,7 +459,7 @@ TDBConnection = class(TComponent)
property LockedByThread: TThread read FLockedByThread write SetLockedByThread;
property Datatypes: TDBDataTypeArray read FDatatypes;
property Favorites: TStringList read FFavorites;
property RegClasses: TIntStringPairs read FRegClasses;
property RegClasses: TOidStringPairs read FRegClasses;
function GetLockedTableCount(db: String): Integer;
function IdentifierEquals(Ident1, Ident2: String): Boolean;
published
Expand Down Expand Up @@ -1545,7 +1545,7 @@ constructor TDBConnection.Create(AOwner: TComponent);
FKeepAliveTimer := TTimer.Create(Self);
FFavorites := TStringList.Create;
// PG only, cache for 123::regclass queries:
FRegClasses := TIntStringPairs.Create;
FRegClasses := TOidStringPairs.Create;
end;


Expand Down
2 changes: 1 addition & 1 deletion source/dbstructures.pas
Expand Up @@ -366,7 +366,7 @@ TMySQLFunction = record
TPQConnectStatus = (CONNECTION_OK, CONNECTION_BAD, CONNECTION_STARTED, CONNECTION_MADE, CONNECTION_AWAITING_RESPONSE, CONNECTION_AUTH_OK, CONNECTION_SETENV, CONNECTION_SSL_STARTUP, CONNECTION_NEEDED);
PPGconn = Pointer;
PPGresult = Pointer;
POid = Integer;
POid = Cardinal;

// Server variables
TVarScope = (vsGlobal, vsSession, vsBoth);
Expand Down

0 comments on commit ffb6170

Please sign in to comment.