pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feed[Minor] Conflicting sentence in "2.4. Populating a Table With Rows"
7+ messages / 4 participants
[nested] [flat]
* [Minor] Conflicting sentence in "2.4. Populating a Table With Rows"
@ 2026-09-28 15:04 PG Doc comments form <noreply@postgresql.org>
0 siblings, 1 reply; 7+ messages in thread
From: PG Doc comments form @ 2026-09-28 15:04 UTC (permalink / raw)
To: pgsql-docs@lists.postgresql.org; +Cc: matematica.a3k@gmail.com
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/18/tutorial-populate.html
Description:
Where it says "The data inserted above into the weather table could also be
inserted from a file containing (values are separated by a tab
character)...":
The data is already inserted from a file in the example, it should say "The
file should have a structure supported by the COPY command, i.e. (values are
separated by a tab character):"
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [Minor] Conflicting sentence in "2.4. Populating a Table With Rows"
@ 2026-09-28 19:35 David G. Johnston <david.g.johnston@gmail.com>
parent: PG Doc comments form <noreply@postgresql.org>
0 siblings, 1 reply; 7+ messages in thread
From: David G. Johnston @ 2026-09-28 19:35 UTC (permalink / raw)
To: matematica.a3k@gmail.com <matematica.a3k@gmail.com>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
On Monday, September 28, 2026, PG Doc comments form <noreply@postgresql.org>
wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/18/tutorial-populate.html
> Description:
>
> Where it says "The data inserted above into the weather table could also be
> inserted from a file containing (values are separated by a tab
> character)...":
> The data is already inserted from a file in the example, it should say "The
> file should have a structure supported by the COPY command, i.e. (values
> are
> separated by a tab character):"
>
>
Yeah, that last part could use some cleanup. I’d probably rewrite it using
csv though instead of tab-delimited so as to remove the need for a
parenthetical.
David J.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [Minor] Conflicting sentence in "2.4. Populating a Table With Rows"
@ 2026-09-29 18:00 Matemática A3K <matematica.a3k@gmail.com>
parent: David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Matemática A3K @ 2026-09-29 18:00 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
On Tue, Sep 29, 2026 at 1:16 PM Matemática A3K <matematica.a3k@gmail.com>
wrote:
> Yeah, that last part could use some cleanup. I’d probably rewrite it
>> using csv though instead of tab-delimited so as to remove the need for a
>> parenthetical.
>>
>> David J.
>>
>
David,
I'm attaching the patch although without the format that Laurenz used (not
sure if it is needed though).
It fixes the problem and removes the parenthetical, do you think is OK?
Thanks!
>
>
Attachments:
[text/x-patch] 0001-doc-fix-tutorial-2_4.patch (1009B, ../../CA+FDnh+c97orQwpMOX9o=tHGFeTX6qi7LUoJCYf0T4mLEX67HA@mail.gmail.com/3-0001-doc-fix-tutorial-2_4.patch)
download | inline diff:
diff --git a/doc/src/sgml/query.sgml b/doc/src/sgml/query.sgml
index b190f28d41e..8f5de9e23bc 100644
--- a/doc/src/sgml/query.sgml
+++ b/doc/src/sgml/query.sgml
@@ -264,14 +264,14 @@ 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. The data inserted above into the weather table
- could also be inserted from a file containing (values are separated by a
- tab character):
+ reads the file directly. The file should have a structure supported by the
+ command, i.e.:
<programlisting>
-San Francisco 46 50 0.25 1994-11-27
-San Francisco 43 57 0.0 1994-11-29
-Hayward 37 54 \N 1994-11-29
+San Francisco;46;50;0.25;1994-11-27
+San Francisco;43;57;0.0;1994-11-29
+Hayward;37;54;;1994-11-29
</programlisting>
You can read more about the <command>COPY</command> command in
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [Minor] Conflicting sentence in "2.4. Populating a Table With Rows"
@ 2026-10-01 08:26 Laurenz Albe <laurenz.albe@cybertec.at>
parent: Matemática A3K <matematica.a3k@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Laurenz Albe @ 2026-10-01 08:26 UTC (permalink / raw)
To: Matemática A3K <matematica.a3k@gmail.com>; David G. Johnston <david.g.johnston@gmail.com>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
On Tue, 2026-09-29 at 15:00 -0300, Matemática A3K wrote:
> > > Yeah, that last part could use some cleanup. I’d probably rewrite it using csv though instead of tab-delimited so as to remove the need for a parenthetical.
> > >
> > > David J.
>
> I'm attaching the patch although without the format that Laurenz used (not sure if it is needed though).
>
> It fixes the problem and removes the parenthetical, do you think is OK?
No issue with the format of the patch, but with the content.
The COPY statement uses the default tab-separated TEXT format, so your CSV data
wouldn't work with it.
The wording in the documentation is confusing, because it does not indicate
that the file below belongs to the COPY statement above.
I think this should read:
You could also have used COPY to load large amounts of data from flat-text files. [...]
An example would be:
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.
The file used in the <command>COPY</command> statement above could look as follows
(the values are separated by a tab character):
San Francisco 46 50 0.25 1994-11-27
San Francisco 43 57 0.0 1994-11-29
Hayward 37 54 \N 1994-11-29
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [Minor] Conflicting sentence in "2.4. Populating a Table With Rows"
@ 2026-10-01 14:23 Matemática A3K <matematica.a3k@gmail.com>
parent: Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 1 reply; 7+ messages in thread
From: Matemática A3K @ 2026-10-01 14:23 UTC (permalink / raw)
To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
On Thu, Oct 1, 2026 at 5:26 AM Laurenz Albe <laurenz.albe@cybertec.at>
wrote:
> On Tue, 2026-09-29 at 15:00 -0300, Matemática A3K wrote:
> > > > Yeah, that last part could use some cleanup. I’d probably rewrite
> it using csv though instead of tab-delimited so as to remove the need for a
> parenthetical.
> > > >
> > > > David J.
> >
> > I'm attaching the patch although without the format that Laurenz used
> (not sure if it is needed though).
> >
> > It fixes the problem and removes the parenthetical, do you think is OK?
>
> No issue with the format of the patch, but with the content.
>
OK
The COPY statement uses the default tab-separated TEXT format, so your CSV
> data
> wouldn't work with it.
>
Good point, tab-separated should be what is shown to better align with the
command mentioned
> The wording in the documentation is confusing, because it does not indicate
> that the file below belongs to the COPY statement above.
>
I agree, it refers to another file and seems disjointed
> I think this should read:
>
> You could also have used COPY to load large amounts of data from
> flat-text files. [...]
> An example would be:
>
> 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.
> The file used in the <command>COPY</command> statement above could look
> as follows
> (the values are separated by a tab character):
>
> San Francisco 46 50 0.25 1994-11-27
> San Francisco 43 57 0.0 1994-11-29
> Hayward 37 54 \N 1994-11-29
>
I agree this is better, it is now crystal clear IMO. If David agrees, I'll
modify the patch to reflect this
>
> Yours,
> Laurenz Albe
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [Minor] Conflicting sentence in "2.4. Populating a Table With Rows"
@ 2026-10-01 15:02 David G. Johnston <david.g.johnston@gmail.com>
parent: Matemática A3K <matematica.a3k@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: David G. Johnston @ 2026-10-01 15:02 UTC (permalink / raw)
To: Matemática A3K <matematica.a3k@gmail.com>; +Cc: Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
On Thu, Oct 1, 2026 at 7:23 AM Matemática A3K <matematica.a3k@gmail.com>
wrote:
>
> On Thu, Oct 1, 2026 at 5:26 AM Laurenz Albe <laurenz.albe@cybertec.at>
> wrote:
>
>> On Tue, 2026-09-29 at 15:00 -0300, Matemática A3K wrote:
>>
>> The COPY statement uses the default tab-separated TEXT format, so your
>> CSV data
>> wouldn't work with it.
>>
>
> Good point, tab-separated should be what is shown to better align with the
> command mentioned
>
I'd just change the command to "copy from ... format csv" ...
David J.
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [Minor] Conflicting sentence in "2.4. Populating a Table With Rows"
@ 2026-10-01 19:14 Matemática A3K <matematica.a3k@gmail.com>
parent: David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 0 replies; 7+ messages in thread
From: Matemática A3K @ 2026-10-01 19:14 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: Laurenz Albe <laurenz.albe@cybertec.at>; pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
On Thu, Oct 1, 2026 at 12:03 PM David G. Johnston <
david.g.johnston@gmail.com> wrote:
> On Thu, Oct 1, 2026 at 7:23 AM Matemática A3K <matematica.a3k@gmail.com>
> wrote:
>
>>
>> On Thu, Oct 1, 2026 at 5:26 AM Laurenz Albe <laurenz.albe@cybertec.at>
>> wrote:
>>
>>> On Tue, 2026-09-29 at 15:00 -0300, Matemática A3K wrote:
>>>
>>> The COPY statement uses the default tab-separated TEXT format, so your
>>> CSV data
>>> wouldn't work with it.
>>>
>>
>> Good point, tab-separated should be what is shown to better align with
>> the command mentioned
>>
>
> I'd just change the command to "copy from ... format csv" ...
>
Both are OK, either would be an improvement in my POV.
I lean towards Laurenz's though because it is shorter, perhaps someone in
the list has an opinion too?
>
> David J.
>
>
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2026-10-01 19:14 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 15:04 [Minor] Conflicting sentence in "2.4. Populating a Table With Rows" PG Doc comments form <noreply@postgresql.org>
2026-09-28 19:35 ` David G. Johnston <david.g.johnston@gmail.com>
2026-09-29 18:00 ` Matemática A3K <matematica.a3k@gmail.com>
2026-10-01 08:26 ` Laurenz Albe <laurenz.albe@cybertec.at>
2026-10-01 14:23 ` Matemática A3K <matematica.a3k@gmail.com>
2026-10-01 15:02 ` David G. Johnston <david.g.johnston@gmail.com>
2026-10-01 19:14 ` Matemática A3K <matematica.a3k@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox