Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ua0or-00D4uc-H4 for pgsql-docs@arkaria.postgresql.org; Thu, 10 Jul 2025 23:36:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ua0oo-000OpG-7o for pgsql-docs@arkaria.postgresql.org; Thu, 10 Jul 2025 23:36:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ua0oo-000Op8-02 for pgsql-docs@lists.postgresql.org; Thu, 10 Jul 2025 23:36:46 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1ua0ol-006ey0-2f for pgsql-docs@lists.postgresql.org; Thu, 10 Jul 2025 23:36:45 +0000 Received: from [192.168.11.9] (p1696134-ipoe.ipoe.ocn.ne.jp [118.0.93.133]) by oss.nttdata.com (Postfix) with ESMTPSA id DF13C6053A; Fri, 11 Jul 2025 08:36:38 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Message-ID: <967885b6-aebf-4ff4-b950-a58c9d67587d@oss.nttdata.com> Date: Fri, 11 Jul 2025 08:36:38 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Missing File weather.txt To: Daniel Gustafsson , Tom Lane Cc: davidhowes@gmail.com, pgsql-docs@lists.postgresql.org References: <158017814191.19852.15019251381150731439@wrigleys.postgresql.org> <68FE7D96-3F05-40E3-B3A2-04CE267CF28A@yesql.se> <89bd784e-c3ab-4d9e-9be1-0846bd8c260c@oss.nttdata.com> <10240.1751736559@sss.pgh.pa.us> <4DF3BEAF-EAAA-4C91-92B3-2CA8F022B383@yesql.se> Content-Language: en-US From: Fujii Masao In-Reply-To: <4DF3BEAF-EAAA-4C91-92B3-2CA8F022B383@yesql.se> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025/07/11 7:22, Daniel Gustafsson wrote: >> On 5 Jul 2025, at 19:29, Tom Lane wrote: >> >> Fujii Masao writes: >>> On 2020/01/28 19:18, Daniel Gustafsson wrote: >>>> 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. >> >>> Sorry for reviving this old thread, but I wanted to follow up since >>> the same issue was reported again in [1], and the proposed patch >>> basically looks good to me. >> >> +1 >> >>> In the tutorial, three rows are inserted using INSERT, so shouldn't >>> the sample input for COPY include all three, like this? >> >> Agreed, the example file should match what the tutorial expects to be >> in the table. I'd include text along the lines of "The data inserted >> above could also be inserted from a file containing:". > > The attached v2 adds the missing line, and tweaks the text added to document > the file. Thanks for updating the patch! LGTM. Just one small comment: +Hayward 37 54 0.0 1994-11-29 This row is inserted using the following INSERT statement: INSERT INTO weather (date, city, temp_hi, temp_lo) VALUES ('1994-11-29', 'Hayward', 54, 37); Since the prcp column isn't specified, its value is NULL. So shouldn't the fourth field in the data line above be \N instead of 0.0? > Since there have been reports I propose backpatching this all the > way down to 13 while at it. +1 Regards, -- Fujii Masao NTT DATA Japan Corporation