@@ -139,6 +139,24 @@ CREATE FOREIGN TABLE ft7 (
139
139
c2 int NOT NULL,
140
140
c3 text
141
141
) SERVER loopback3 OPTIONS (schema_name 'S 1', table_name 'T 4');
142
+ CREATE FOREIGN TABLE ft8 (
143
+ c1 int OPTIONS (column_name '') NOT NULL,
144
+ c2 int NOT NULL,
145
+ c3 text
146
+ ) SERVER loopback3 OPTIONS (schema_name 'S 1', table_name 'T 4');
147
+ ERROR: value for option "column_name" must not be empty string
148
+ CREATE FOREIGN TABLE ft8 (
149
+ c1 int NOT NULL,
150
+ c2 int NOT NULL,
151
+ c3 text
152
+ ) SERVER loopback3 OPTIONS (schema_name '', table_name 'T 4');
153
+ ERROR: value for option "schema_name" must not be empty string
154
+ CREATE FOREIGN TABLE ft8 (
155
+ c1 int NOT NULL,
156
+ c2 int NOT NULL,
157
+ c3 text
158
+ ) SERVER loopback3 OPTIONS (schema_name 'S 1', table_name '');
159
+ ERROR: value for option "table_name" must not be empty string
142
160
-- ===================================================================
143
161
-- tests for validator
144
162
-- ===================================================================
@@ -196,10 +214,16 @@ ALTER USER MAPPING FOR public SERVER testserver1
196
214
-- permitted to check validation.
197
215
ALTER USER MAPPING FOR public SERVER testserver1
198
216
OPTIONS (ADD sslkey 'value', ADD sslcert 'value');
217
+ ALTER FOREIGN TABLE ft1 OPTIONS (schema_name '', table_name 'T 1');
218
+ ERROR: value for option "schema_name" must not be empty string
219
+ ALTER FOREIGN TABLE ft1 OPTIONS (schema_name 'S 1', table_name '');
220
+ ERROR: value for option "table_name" must not be empty string
199
221
ALTER FOREIGN TABLE ft1 OPTIONS (schema_name 'S 1', table_name 'T 1');
200
222
ALTER FOREIGN TABLE ft2 OPTIONS (schema_name 'S 1', table_name 'T 1');
201
223
ALTER FOREIGN TABLE ft1 ALTER COLUMN c1 OPTIONS (column_name 'C 1');
202
224
ALTER FOREIGN TABLE ft2 ALTER COLUMN c1 OPTIONS (column_name 'C 1');
225
+ ALTER FOREIGN TABLE ft2 ALTER COLUMN c2 OPTIONS (column_name '');
226
+ ERROR: value for option "column_name" must not be empty string
203
227
\det+
204
228
List of foreign tables
205
229
Schema | Table | Server | FDW options | Description
0 commit comments