@@ -139,6 +139,24 @@ CREATE FOREIGN TABLE ft7 (
139139 c2 int NOT NULL,
140140 c3 text
141141) 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
142160-- ===================================================================
143161-- tests for validator
144162-- ===================================================================
@@ -196,10 +214,16 @@ ALTER USER MAPPING FOR public SERVER testserver1
196214-- permitted to check validation.
197215ALTER USER MAPPING FOR public SERVER testserver1
198216 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
199221ALTER FOREIGN TABLE ft1 OPTIONS (schema_name 'S 1', table_name 'T 1');
200222ALTER FOREIGN TABLE ft2 OPTIONS (schema_name 'S 1', table_name 'T 1');
201223ALTER FOREIGN TABLE ft1 ALTER COLUMN c1 OPTIONS (column_name 'C 1');
202224ALTER 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
203227\det+
204228 List of foreign tables
205229 Schema | Table | Server | FDW options | Description
0 commit comments