Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita3021aa

Browse files
committed
Make postgres_fdw request remote time zone 'GMT' not 'UTC'.
This should have the same results for all practical purposes.The advantage of selecting 'GMT' is that it's guaranteed to workeven when the remote system's timezone database is missingentries, because pg_tzset() hard-wires handling of that,at least in 9.2 and later.(It seems like it would be a good idea to similarly hard-wirecorrect handling of 'UTC', but that'll be a little more invasivethan I want to consider back-patching. Leave that for anotherday when we're not in feature freeze.)Per trouble report from Adnan Dautovic. Back-patch to allsupported branches.Discussion:https://postgr.es/m/465248.1712211585@sss.pgh.pa.us
1 parentf4fdc24 commita3021aa

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎contrib/postgres_fdw/connection.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -671,10 +671,12 @@ configure_remote_session(PGconn *conn)
671671
* anyway. However it makes the regression test outputs more predictable.
672672
*
673673
* We don't risk setting remote zone equal to ours, since the remote
674-
* server might use a different timezone database. Instead, use UTC
675-
* (quoted, because very old servers are picky about case).
674+
* server might use a different timezone database. Instead, use GMT
675+
* (quoted, because very old servers are picky about case). That's
676+
* guaranteed to work regardless of the remote's timezone database,
677+
* because pg_tzset() hard-wires it (at least in PG 9.2 and later).
676678
*/
677-
do_sql_command(conn,"SET timezone = 'UTC'");
679+
do_sql_command(conn,"SET timezone = 'GMT'");
678680

679681
/*
680682
* Set values needed to ensure unambiguous data output from remote. (This

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp