forked from MaterializeInc/materialize
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coord: allow +00:00 as a valid value for timezone
It helps with compatibility with some drivers, in particular Sequelize.
- Loading branch information
Showing
7 changed files
with
177 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Test status codes for errors related to setting session variables. | ||
|
||
# Errors shared with Postgres are covered in pgtest/vars.pt. | ||
|
||
# FixedValueParameter maps to 22023 | ||
send | ||
Query {"query": "SET STANDARD_CONFORMING_STRINGS TO false"} | ||
---- | ||
|
||
until | ||
ReadyForQuery | ||
---- | ||
ErrorResponse {"fields":[{"typ":"S","value":"ERROR"},{"typ":"C","value":"22023"},{"typ":"M","value":"parameter \"standard_conforming_strings\" can only be set to \"on\""}]} | ||
ReadyForQuery {"status":"I"} | ||
|
||
# InvalidParameterValue maps to 22023 | ||
send | ||
Query {"query": "SET STANDARD_CONFORMING_STRINGS TO not_a_boolean"} | ||
---- | ||
|
||
until | ||
ReadyForQuery | ||
---- | ||
ErrorResponse {"fields":[{"typ":"S","value":"ERROR"},{"typ":"C","value":"22023"},{"typ":"M","value":"parameter \"standard_conforming_strings\" requires a \"boolean\" value"}]} | ||
ReadyForQuery {"status":"I"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Test status codes for errors related to setting session variables. | ||
|
||
# FixedValueParameter and InvalidParameterValue are covered | ||
# in pgtest-mz/vars.pt | ||
|
||
# ConstrainedParameter maps to 22023 | ||
send | ||
Query {"query": "SET TIMEZONE TO bad"} | ||
---- | ||
|
||
until | ||
ReadyForQuery | ||
---- | ||
ErrorResponse {"fields":[{"typ":"S","value":"ERROR"},{"typ":"C","value":"22023"},{"typ":"M","value":"invalid value for parameter \"TimeZone\": \"bad\""}]} | ||
ReadyForQuery {"status":"I"} | ||
|
||
# ReadOnlyParameter maps to 55P02 | ||
send | ||
Query {"query": "SET SERVER_VERSION TO 10.0"} | ||
---- | ||
|
||
until | ||
ReadyForQuery | ||
---- | ||
ErrorResponse {"fields":[{"typ":"S","value":"ERROR"},{"typ":"C","value":"55P02"},{"typ":"M","value":"parameter \"server_version\" cannot be changed"}]} | ||
ReadyForQuery {"status":"I"} | ||
|
||
# InvalidParameterType maps to 22023 | ||
send | ||
Query {"query": "SET STANDARD_CONFORMING_STRINGS TO nonbool"} | ||
---- | ||
|
||
# Our message differs from Postgres, so skip it | ||
until err_field_typs=SC | ||
ReadyForQuery | ||
---- | ||
ErrorResponse {"fields":[{"typ":"S","value":"ERROR"},{"typ":"C","value":"22023"}]} | ||
ReadyForQuery {"status":"I"} | ||
|
||
|
||
# UnknownParameter maps to 42704 | ||
send | ||
Query {"query": "SET I_DONT_EXIST TO any_value"} | ||
---- | ||
|
||
until | ||
ReadyForQuery | ||
---- | ||
ErrorResponse {"fields":[{"typ":"S","value":"ERROR"},{"typ":"C","value":"42704"},{"typ":"M","value":"unrecognized configuration parameter \"i_dont_exist\""}]} | ||
ReadyForQuery {"status":"I"} | ||
|
||
# client_min_messages sends hint | ||
send | ||
Query {"query": "SET client_min_messages TO bad"} | ||
---- | ||
|
||
until err_field_typs=SCMH | ||
ReadyForQuery | ||
---- | ||
ErrorResponse {"fields":[{"typ":"S","value":"ERROR"},{"typ":"C","value":"22023"},{"typ":"M","value":"invalid value for parameter \"client_min_messages\": \"bad\""},{"typ":"H","value":"Available values: debug5, debug4, debug3, debug2, debug1, log, notice, warning, error."}]} | ||
ReadyForQuery {"status":"I"} | ||
|
||
# TimeZone does not send hint | ||
send | ||
Query {"query": "SET TimeZone TO bad"} | ||
---- | ||
|
||
until err_field_typs=SCMH | ||
ReadyForQuery | ||
---- | ||
ErrorResponse {"fields":[{"typ":"S","value":"ERROR"},{"typ":"C","value":"22023"},{"typ":"M","value":"invalid value for parameter \"TimeZone\": \"bad\""}]} | ||
ReadyForQuery {"status":"I"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters