From 580d8ac9b1ef2803f39b1e23d9da68fff9109c42 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Sat, 18 Jul 2020 10:42:46 +0900 Subject: [PATCH] doc: Fix description of \copy for psql The WHERE clause introduced by 31f3817 was not described. While on it, split the grammar of \copy FROM and TO into two distinct parts for clarity as they support different set of options. Author: Vignesh C Discussion: https://postgr.es/m/CALDaNm3zWr=OmxeNqOqfT=uZTSdam_j-gkX94CL8eTNfgUtf6A@mail.gmail.com Backpatch-through: 12 --- doc/src/sgml/ref/psql-ref.sgml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 42e862cf17..13179e845d 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -982,9 +982,15 @@ testdb=> + \copy { table [ ( column_list ) ] } + from + { 'filename' | program 'command' | stdin | pstdin } + [ [ with ] ( option [, ...] ) ] + [ where condition ] + \copy { table [ ( column_list ) ] | ( query ) } - { from | to } - { 'filename' | program 'command' | stdin | stdout | pstdin | pstdout } + to + { 'filename' | program 'command' | stdout | pstdout } [ [ with ] ( option [, ...] ) ]