[BUG?] SET TIME ZONE doesn't work with abbreviations
От | Aleksander Alekseev |
---|---|
Тема | [BUG?] SET TIME ZONE doesn't work with abbreviations |
Дата | |
Msg-id | CAJ7c6TOTK9WY2Qgn31khoRWmZfLkr=nZwds4EBhTmOuiHaZWTA@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: [BUG?] SET TIME ZONE doesn't work with abbreviations
Re: [BUG?] SET TIME ZONE doesn't work with abbreviations |
Список | pgsql-hackers |
Hi hackers, I noticed that `SET TIME ZONE` / `SET timezone TO` don't work with abbreviations: ``` # select * from pg_timezone_names where abbrev = 'MSK'; name | abbrev | utc_offset | is_dst -------------------+--------+------------+-------- Europe/Moscow | MSK | 03:00:00 | f Europe/Simferopol | MSK | 03:00:00 | f W-SU | MSK | 03:00:00 | f 97394 (master) =# set time zone 'Europe/Moscow'; SET 97394 (master) =# set time zone 'MSK'; ERROR: invalid value for parameter "TimeZone": "MSK" ``` However, I can use both Europe/Moscow and MSK in timestamptz_in(): ``` # select '2021-09-07 12:34:56 Europe/Moscow' :: timestamptz; timestamptz ------------------------ 2021-09-07 12:34:56+03 # select '2021-09-07 12:34:56 MSK' :: timestamptz; timestamptz ------------------------ 2021-09-07 12:34:56+03 ``` PostgreSQL was built on MacOS Catalina without the `--with-system-tzdata=` flag. Is it a bug or this behavior is intentional (something to do with SQL standard, perhaps)? -- Best regards, Aleksander Alekseev
В списке pgsql-hackers по дате отправления: