@@ -115,6 +115,9 @@ SELECT * FROM text_csv;
115115 ABC | abc | |
116116(5 rows)
117117
118+ -- force_not_null and force_null can be used together on the same column
119+ ALTER FOREIGN TABLE text_csv ALTER COLUMN word1 OPTIONS (force_null 'true');
120+ ALTER FOREIGN TABLE text_csv ALTER COLUMN word3 OPTIONS (force_not_null 'true');
118121-- force_not_null is not allowed to be specified at any foreign object level:
119122ALTER FOREIGN DATA WRAPPER file_fdw OPTIONS (ADD force_not_null '*'); -- ERROR
120123ERROR: invalid option "force_not_null"
@@ -128,10 +131,6 @@ HINT: There are no valid options in this context.
128131CREATE FOREIGN TABLE tbl () SERVER file_server OPTIONS (force_not_null '*'); -- ERROR
129132ERROR: invalid option "force_not_null"
130133HINT: Valid options in this context are: filename, format, header, delimiter, quote, escape, null, encoding
131- -- force_not_null cannot be specified together with force_null
132- ALTER FOREIGN TABLE text_csv ALTER COLUMN word1 OPTIONS (force_null 'true'); --ERROR
133- ERROR: conflicting or redundant options
134- HINT: option "force_null" cannot be used together with "force_not_null"
135134-- force_null is not allowed to be specified at any foreign object level:
136135ALTER FOREIGN DATA WRAPPER file_fdw OPTIONS (ADD force_null '*'); -- ERROR
137136ERROR: invalid option "force_null"
@@ -145,10 +144,6 @@ HINT: There are no valid options in this context.
145144CREATE FOREIGN TABLE tbl () SERVER file_server OPTIONS (force_null '*'); -- ERROR
146145ERROR: invalid option "force_null"
147146HINT: Valid options in this context are: filename, format, header, delimiter, quote, escape, null, encoding
148- -- force_null cannot be specified together with force_not_null
149- ALTER FOREIGN TABLE text_csv ALTER COLUMN word3 OPTIONS (force_not_null 'true'); --ERROR
150- ERROR: conflicting or redundant options
151- HINT: option "force_not_null" cannot be used together with "force_null"
152147-- basic query tests
153148SELECT * FROM agg_text WHERE b > 10.0 ORDER BY a;
154149 a | b
0 commit comments