in TZAbstractPostgreSQLPreparedStatementV3.GetRawEncodedSQL
it does:
Code: Select all
if (FTokenMatchIndex = -1) and (FPQResultFormat = ParamFormatBin) then
Also the "set" command for time zones allows the syntax:
SET TIMEZONE = 'UTC';
(besides the normal SET TIME ZONE syntax)
So I added cTimeZone: PChar = 'TIMEZONE'; to the constants and check for it before the check for cTime. Here's my code:
Code: Select all
if (NextToken.TokenType = ttWord) and (NextToken.L = 8) and SameText(NextToken.P, cTimeZone, 8) and (Tokens.Count > J+1) then begin
FDoUpdateTimestampOffet := True;
end
else // next line already exists
if (NextToken.TokenType = ttWord) and (NextToken.L = 4) and SameText(NextToken.P, cTime, 4) and (Tokens.Count > J+1) then begin
-Mark