Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bplKA-0003DF-2W for pgsql-docs@arkaria.postgresql.org; Fri, 30 Sep 2016 00:05:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bplK9-0004hR-Ld for pgsql-docs@arkaria.postgresql.org; Fri, 30 Sep 2016 00:05:09 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bpd2s-0002eh-RA for pgsql-docs@postgresql.org; Thu, 29 Sep 2016 15:14:46 +0000 Received: from mail.nygenome.org ([162.220.30.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bpd2n-0005aX-5F for pgsql-docs@postgresql.org; Thu, 29 Sep 2016 15:14:44 +0000 Received: from disco.erlich.nygenome.org (10.3.252.19) by pexmbx03.NYGENOME.ORG (10.1.19.13) with Microsoft SMTP Server (TLS) id 15.1.466.34; Thu, 29 Sep 2016 11:14:35 -0400 To: From: Assaf Gordon Subject: suggestion: add explicit example for COPY of new-vs-old syntax Message-ID: Date: Thu, 29 Sep 2016 11:14:38 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------AFE6B15702E45E67FE86E19E" X-Originating-IP: [10.3.252.19] X-ClientProxiedBy: pexmbxcas02.NYGENOME.ORG (10.1.19.16) To pexmbx03.NYGENOME.ORG (10.1.19.13) X-Pg-Spam-Score: -4.9 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --------------AFE6B15702E45E67FE86E19E Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Hello, I'd like to suggest the following small patch (attached), to give explicit example for COPY of new-vs-old syntax at the top of the pa= ge. =3D=3D=3D Starting with PostgreSQL version 9.0, the COPY commands supports new syntax with parenthesis and commas. The old syntax is still supported, see details at the bottom of this page. New syntax: COPY country TO STDOUT (FORMAT CSV, NULL 'NA', HEADER ON); Old syntax: COPY country TO STDOUT NULL 'NA' CSV HEADER; =3D=3D=3D The web is full of examples, but many of them are for the old syntax. The COPY documentation page mentions this critical difference only in passi= ng, and requires careful reading of the entire page to spot the culprit of synt= ax errors. A typical example is: https://www.postgresql.org/message-id/26320.1291391510%40sss.pgh.pa.us I know examples usually go at the end of the page, but I think in this case, a short example is worth at least 100 words :) Comments (and rephrasing) are welcomed, regards, - assaf This electronic message is intended for the use of the named recipient only= , and may contain information that is confidential, privileged or protected= from disclosure under applicable law. If you are not the intended recipien= t, or an employee or agent responsible for delivering this message to the i= ntended recipient, you are hereby notified that any reading, disclosure, di= ssemination, distribution, copying or use of the contents of this message i= ncluding any of its attachments is strictly prohibited. If you have receive= d this message in error or are not the named recipient, please notify us im= mediately by contacting the sender at the electronic mail address noted abo= ve, and destroy all copies of this message. Please note, the recipient shou= ld check this email and any attachments for the presence of viruses. The or= ganization accepts no liability for any damage caused by any virus transmit= ted by this email. --------------AFE6B15702E45E67FE86E19E Content-Type: text/x-patch; name="0001-Add-new-vs-old-COPY-syntax-example-in-documentation.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Add-new-vs-old-COPY-syntax-example-in-documentation.pat"; filename*1="ch"