From 9e96fa409f857e6e6649c7f201f9a802a87b70d3 Mon Sep 17 00:00:00 2001
From: Assaf Gordon <assafgordon@gmail.com>
Date: Thu, 29 Sep 2016 11:06:35 -0400
Subject: [PATCH] Add new-vs-old COPY syntax example in documentation

---
 doc/src/sgml/ref/copy.sgml | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml
index 07e2f45..531009b 100644
--- a/doc/src/sgml/ref/copy.sgml
+++ b/doc/src/sgml/ref/copy.sgml
@@ -86,6 +86,31 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
  </refsect1>
 
  <refsect1>
+  <title>New versus old syntax</title>
+  <para>
+   Starting with <productname>PostgreSQL</> version 9.0, the
+   <command>COPY</command> commands supports new syntax with parenthesis
+   and commas. The old syntax is still supported, see details
+   at the bottom of this page.
+  </para>
+
+  <para>
+   New syntax:
+<programlisting>
+COPY country TO STDOUT (FORMAT CSV, NULL 'NA', HEADER ON);
+</programlisting>
+  </para>
+
+  <para>
+   Old syntax:
+<programlisting>
+COPY country TO STDOUT NULL 'NA' CSV HEADER;
+</programlisting>
+  </para>
+
+ </refsect1>
+
+ <refsect1>
   <title>Parameters</title>
 
   <variablelist>
-- 
2.8.2

