Re: Possible typos in the #12.1.1 examples - Mailing list pgsql-docs

From Michael Paquier
Subject Re: Possible typos in the #12.1.1 examples
Date
Msg-id 20200305074523.GX2593@paquier.xyz
Whole thread Raw
In response to Possible typos in the #12.1.1 examples  (PG Doc comments form <noreply@postgresql.org>)
Responses Re: Possible typos in the #12.1.1 examples  (Bruce Momjian <bruce@momjian.us>)
List pgsql-docs
On Mon, Mar 02, 2020 at 03:38:01PM +0000, PG Doc comments form wrote:
> Seems like here the example missed 'm' as an alias and a dot in the `where`
> clause:
> ... messages m
> ... m.id = 12;

This query is valid as-is.

> SELECT m.title || ' ' || m.author || ' ' || m.abstract || ' ' || d.body AS
> document
> FROM messages m, docs d
> WHERE mid = did AND mid = 12;
>
> Possibly, the example missed dots:
> ... m.id = d.id AND m.id = 12;

This one is actually valid as well, as long as both relations don't
use the same column names, but I can see your point to add the aliases
to the quals of the WHERE clause to bring more clarity.
--
Michael

Attachment

pgsql-docs by date:

Previous
From: PG Doc comments form
Date:
Subject: Error in docs
Next
From: Michael Paquier
Date:
Subject: Re: Error in docs