Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iwNwl-0005BN-MQ for pgsql-docs@arkaria.postgresql.org; Tue, 28 Jan 2020 10:18:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iwNwk-0000MC-53 for pgsql-docs@arkaria.postgresql.org; Tue, 28 Jan 2020 10:18:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iwNwj-0000M5-Tf for pgsql-docs@lists.postgresql.org; Tue, 28 Jan 2020 10:18:13 +0000 Received: from smtp2.outgoing.loopia.se ([93.188.3.37]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iwNwb-0007I9-UZ for pgsql-docs@lists.postgresql.org; Tue, 28 Jan 2020 10:18:12 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 42B332E4BE12 for ; Tue, 28 Jan 2020 11:18:04 +0100 (CET) Received: from s645.loopia.se (unknown [172.22.191.5]) by s807.loopia.se (Postfix) with ESMTP id 243282E293F1; Tue, 28 Jan 2020 11:18:04 +0100 (CET) Received: from s470.loopia.se (unknown [172.22.191.5]) by s645.loopia.se (Postfix) with ESMTP id 0C976156E53D; Tue, 28 Jan 2020 11:18:04 +0100 (CET) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1 X-Spam-Level: X-Spam-Status: No, score=-1 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1] autolearn=disabled Received: from s498.loopia.se ([172.22.191.5]) by s470.loopia.se (s470.loopia.se [172.22.190.10]) (amavisd-new, port 10024) with UTF8LMTP id FFX66KwtoJf5; Tue, 28 Jan 2020 11:18:03 +0100 (CET) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.193 Received: from [192.168.72.43] (customer-89-255-232-193.stosn.net [89.255.232.193]) (Authenticated sender: daniel@yesql.se) by s498.loopia.se (Postfix) with ESMTPSA id 5752D470801; Tue, 28 Jan 2020 11:18:03 +0100 (CET) From: Daniel Gustafsson Content-Type: multipart/mixed; boundary="Apple-Mail=_BDBB21ED-B6AC-4C55-A6B8-588206CF56FB" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Missing File weather.txt Date: Tue, 28 Jan 2020 11:18:02 +0100 References: <158017814191.19852.15019251381150731439@wrigleys.postgresql.org> To: davidhowes@gmail.com, pgsql-docs@lists.postgresql.org In-Reply-To: <158017814191.19852.15019251381150731439@wrigleys.postgresql.org> Message-Id: <68FE7D96-3F05-40E3-B3A2-04CE267CF28A@yesql.se> X-Mailer: Apple Mail (2.3445.104.11) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_BDBB21ED-B6AC-4C55-A6B8-588206CF56FB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 28 Jan 2020, at 03:22, PG Doc comments form = wrote: >=20 > The following documentation comment has been logged on the website: >=20 > Page: https://www.postgresql.org/docs/12/tutorial-populate.html > Description: >=20 > On this page https://www.postgresql.org/docs/12/tutorial-populate.html = you > have this command: >=20 > COPY weather FROM '/home/user/weather.txt'; >=20 > I've searched all over for weather.txt and can't find it. Please could = you > make this and any other files required for the tutorial available and > provide clear instructions for accessing them at the beginning of the > tutorial. This is only mentioned as an example of another input method, with a = link to the COPY page for more information. That being said, it's a good thing = for a tutorial to be self-contained, and going from a basic tutorial to the = COPY reference page is a fairly large step. I propose that we add a small = example on what weather.txt could look like as per the attached diff. cheers ./daniel --Apple-Mail=_BDBB21ED-B6AC-4C55-A6B8-588206CF56FB Content-Disposition: attachment; filename=tutorial_weather.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="tutorial_weather.diff" Content-Transfer-Encoding: 7bit diff --git a/doc/src/sgml/query.sgml b/doc/src/sgml/query.sgml index c0889743c4..9608541915 100644 --- a/doc/src/sgml/query.sgml +++ b/doc/src/sgml/query.sgml @@ -266,8 +266,16 @@ COPY weather FROM '/home/user/weather.txt'; where the file name for the source file must be available on the machine running the backend process, not the client, since the backend process - reads the file directly. You can read more about the - COPY command in . + reads the file directly. An example input file is shown below, note that + the white space on each line is actually a tab character. + + +San Francisco 46 50 0.25 1994-11-27 +Hayward 37 54 0.0 1994-11-29 + + + You can read more about the COPY command in + . --Apple-Mail=_BDBB21ED-B6AC-4C55-A6B8-588206CF56FB--