mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
copy: update docs for FORCE_NULL and FORCE_NOT_NULL combination
Also update regression tests Patch by Michael Paquier
This commit is contained in:
@ -91,24 +91,22 @@ ALTER FOREIGN TABLE text_csv OPTIONS (SET format 'csv');
|
||||
\pset null _null_
|
||||
SELECT * FROM text_csv;
|
||||
|
||||
-- force_not_null and force_null can be used together on the same column
|
||||
ALTER FOREIGN TABLE text_csv ALTER COLUMN word1 OPTIONS (force_null 'true');
|
||||
ALTER FOREIGN TABLE text_csv ALTER COLUMN word3 OPTIONS (force_not_null 'true');
|
||||
|
||||
-- force_not_null is not allowed to be specified at any foreign object level:
|
||||
ALTER FOREIGN DATA WRAPPER file_fdw OPTIONS (ADD force_not_null '*'); -- ERROR
|
||||
ALTER SERVER file_server OPTIONS (ADD force_not_null '*'); -- ERROR
|
||||
CREATE USER MAPPING FOR public SERVER file_server OPTIONS (force_not_null '*'); -- ERROR
|
||||
CREATE FOREIGN TABLE tbl () SERVER file_server OPTIONS (force_not_null '*'); -- ERROR
|
||||
|
||||
-- force_not_null cannot be specified together with force_null
|
||||
ALTER FOREIGN TABLE text_csv ALTER COLUMN word1 OPTIONS (force_null 'true'); --ERROR
|
||||
|
||||
-- force_null is not allowed to be specified at any foreign object level:
|
||||
ALTER FOREIGN DATA WRAPPER file_fdw OPTIONS (ADD force_null '*'); -- ERROR
|
||||
ALTER SERVER file_server OPTIONS (ADD force_null '*'); -- ERROR
|
||||
CREATE USER MAPPING FOR public SERVER file_server OPTIONS (force_null '*'); -- ERROR
|
||||
CREATE FOREIGN TABLE tbl () SERVER file_server OPTIONS (force_null '*'); -- ERROR
|
||||
|
||||
-- force_null cannot be specified together with force_not_null
|
||||
ALTER FOREIGN TABLE text_csv ALTER COLUMN word3 OPTIONS (force_not_null 'true'); --ERROR
|
||||
|
||||
-- basic query tests
|
||||
SELECT * FROM agg_text WHERE b > 10.0 ORDER BY a;
|
||||
SELECT * FROM agg_csv ORDER BY a;
|
||||
|
Reference in New Issue
Block a user