sql: perform time zone name comparison case-insensitively #36847
Labels
A-sql-pgcompat
Semantic compatibility with PostgreSQL
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
S-3-ux-surprise
Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.
In Postgres, the session timezone setting can always be set by name case-insensitively, but this isn't the case in CockroachDB. Here are examples using
set timezone
in Postgres 11:PG 11, interactive
CockroachDB's behavior is not internally consistent and I'm not sure what the pattern is. When using
set timezone
interactively,utc
andest
are accepted, butamerica/new_york
is not:CockroachDB 19.1, interactive
And when pasing the timezone in the connection URL, the case-sensitive zone name appears to always be required:
utc
andest
don't work, and neither doesamerica/new_york
:CockroachDB 19.1, connection string
Directly motivated by #14988, but we've seen the same issue before (e.g. #31297). In the past we've said "timezones are case sensitive on Linux", but that's a distinction that Postgres doesn't make, so that seems like an unnecessary restriction.
The text was updated successfully, but these errors were encountered: