From f6d4c9cf162b70f2837fb6c2a83e80a3f3410695 Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Sat, 30 Sep 2023 12:34:41 -0400 Subject: Provide FORCE_NULL * and FORCE_NOT_NULL * options for COPY FROM These options already exist, but you need to specify a column list for them, which can be cumbersome. We already have the possibility of all columns for FORCE QUOTE, so this is simply extending that facility to FORCE_NULL and FORCE_NOT_NULL. Author: Zhang Mingli Reviewed-By: Richard Guo, Kyatoro Horiguchi, Michael Paquier. Discussion: https://postgr.es/m/CACJufxEnVqzOFtqhexF2+AwOKFrV8zHOY3y=p+gPK6eB14pn_w@mail.gmail.com --- doc/src/sgml/ref/copy.sgml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml index 4d614a0225d..d12ba96497a 100644 --- a/doc/src/sgml/ref/copy.sgml +++ b/doc/src/sgml/ref/copy.sgml @@ -41,8 +41,8 @@ COPY { table_name [ ( quote_character' ESCAPE 'escape_character' FORCE_QUOTE { ( column_name [, ...] ) | * } - FORCE_NOT_NULL ( column_name [, ...] ) - FORCE_NULL ( column_name [, ...] ) + FORCE_NOT_NULL { ( column_name [, ...] ) | * } + FORCE_NULL { ( column_name [, ...] ) | * } ENCODING 'encoding_name' @@ -350,6 +350,7 @@ COPY { table_name [ ( * is specified, the option will be applied to all columns. This option is allowed only in COPY FROM, and only when using CSV format. @@ -364,6 +365,7 @@ COPY { table_name [ ( NULL. In the default case where the null string is empty, this converts a quoted empty string into NULL. + If * is specified, the option will be applied to all columns. This option is allowed only in COPY FROM, and only when using CSV format. -- cgit v1.2.3