forked from MaterializeInc/materialize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvars.pt
72 lines (58 loc) · 2.07 KB
/
vars.pt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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"}