Re: Document efficient self-joins / UPDATE LIMIT techniques.

Corey Huinker <corey.huinker@gmail.com>

From: Corey Huinker <corey.huinker@gmail.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: vignesh C <vignesh21@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2024-02-12T16:45:26Z
Lists: pgsql-hackers

Attachments

>
>
> - About the style: there is usually an empty line between an ending </para>
>   and the next starting <para>.  It does not matter for correctness, but I
>   think it makes the source easier to read.
>

Done. I've seen them with spaces and without, and have no preference.


>
> - I would rather have only "here" as link text rather than "in greater
> details
>   here".  Even better would be something that gives the reader a clue where
>   the link will take her, like
>   <link linkend="update-limit">the documentation of
> <command>UPDATE</command></link>.
>

Done.

>
> - I am not sure if it is necessary to have the <programlisting> at all.
>   I'd say that it is just a trivial variation of the UPDATE example.
>   On the other hand, a beginner might find the example useful.
>   Not sure.
>

I think a beginner would find it useful. The join syntax for DELETE is
different from UPDATE in a way that has never made sense to me, and a
person with only the UPDATE example might try just replacing UPDATE WITH
DELETE and eliminating the SET clause, and frustration would follow. We
have an opportunity to show the equivalent join in both cases, let's use it.



> I think the "in" before between is unnecessary and had better be removed,
> but
> I'll defer to the native speaker.
>

The "in" is more common when spoken. Removed.

Commits

  1. Doc: show how to get the equivalent of LIMIT for UPDATE/DELETE.