From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | axykon(at)gmail(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org |
Subject: | Re: Possible typos in the #12.1.1 examples |
Date: | 2020-03-21 00:19:56 |
Message-ID: | 20200321001956.GB10066@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On Thu, Mar 5, 2020 at 04:45:23PM +0900, Michael Paquier wrote:
> 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.
Agreed, alias added in all supported branches.
--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EnterpriseDB https://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
From | Date | Subject | |
---|---|---|---|
Next Message | Corey Huinker | 2020-03-21 03:45:31 | Re: Add A Glossary |
Previous Message | Justin Pryzby | 2020-03-20 23:03:18 | Re: Add A Glossary |