[Minor] Conflicting sentence in "2.4. Populating a Table With Rows"
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
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):"
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.
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!
Show quoted text
Attachments:
0001-doc-fix-tutorial-2_4.patchtext/x-patch; charset=US-ASCII; name=0001-doc-fix-tutorial-2_4.patchDownload+5-6
Import Notes
Reply to msg id not found: CA+FDnhLubC2OR0xs0ZQx=f6xYeqLLQgoq1XeD7p=Qo2Re1-8qg@mail.gmail.com
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
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
Show quoted text
Yours,
Laurenz Albe
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.
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 mentionedI'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?
Show quoted text
David J.