public inbox for [email protected]
help / color / mirror / Atom feedDocumentation does not cover multiple WITH in one query
4+ messages / 3 participants
[nested] [flat]
* Documentation does not cover multiple WITH in one query
@ 2018-08-22 09:24 PG Doc comments form <[email protected]>
2018-08-24 20:29 ` Re: Documentation does not cover multiple WITH in one query Bruce Momjian <[email protected]>
0 siblings, 1 reply; 4+ messages in thread
From: PG Doc comments form @ 2018-08-22 09:24 UTC (permalink / raw)
To: [email protected]; +Cc: [email protected]
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/10/static/queries-with.html
Description:
Hi. I have found
[DOC](https://www.postgresql.org/docs/10/static/queries-with.html)
it is fine, but did not cover multiple WITH in one query.
I found answer only [here](https://stackoverflow.com/a/38137037/4632019)
May you please add the example:
WITH table1 AS (...), table2 AS (...) SELECT * FROM table1, table2
thank you
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Documentation does not cover multiple WITH in one query
2018-08-22 09:24 Documentation does not cover multiple WITH in one query PG Doc comments form <[email protected]>
@ 2018-08-24 20:29 ` Bruce Momjian <[email protected]>
2018-08-26 09:08 ` Re: Documentation does not cover multiple WITH in one query KES <[email protected]>
0 siblings, 1 reply; 4+ messages in thread
From: Bruce Momjian @ 2018-08-24 20:29 UTC (permalink / raw)
To: [email protected]; [email protected]
On Wed, Aug 22, 2018 at 09:24:52AM +0000, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/10/static/queries-with.html
> Description:
>
> Hi. I have found
> [DOC](https://www.postgresql.org/docs/10/static/queries-with.html)
>
> it is fine, but did not cover multiple WITH in one query.
>
> I found answer only [here](https://stackoverflow.com/a/38137037/4632019)
>
> May you please add the example:
>
> WITH table1 AS (...), table2 AS (...) SELECT * FROM table1, table2
Well, the SELECT manual has:
[ WITH [ RECURSIVE ] with_query [, ...] ]
and with_query is shown as:
with_query_name [ ( column_name [, ...] ) ] AS ( select | values | insert | update | delete )
This is standard SQL. I don't think we are going to be able to show
every possible syntax.
--
Bruce Momjian <[email protected]> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Documentation does not cover multiple WITH in one query
2018-08-22 09:24 Documentation does not cover multiple WITH in one query PG Doc comments form <[email protected]>
2018-08-24 20:29 ` Re: Documentation does not cover multiple WITH in one query Bruce Momjian <[email protected]>
@ 2018-08-26 09:08 ` KES <[email protected]>
2018-08-26 13:15 ` Re: Documentation does not cover multiple WITH in one query Bruce Momjian <[email protected]>
0 siblings, 1 reply; 4+ messages in thread
From: KES @ 2018-08-26 09:08 UTC (permalink / raw)
To: Bruce Momjian <[email protected]>; [email protected] <[email protected]>
Thank you. That is I am looking for.
Never thought that 'WITH' syntax is described at 'SELECT'.
Will be very helpful if this will be mentioned on this page: https://www.postgresql.org/docs/10/static/queries-with.html
For an example:
[ WITH [ RECURSIVE ] with_query [, ...] ]
and with_query is shown as:
with_query_name [ ( column_name [, ...] ) ] AS ( select | values | insert | update | delete )
For full syntax of `WITH` see https://www.postgresql.org/docs/10/static/sql-select.html
Thanks.
24.08.2018, 23:30, "Bruce Momjian" <[email protected]>:
> On Wed, Aug 22, 2018 at 09:24:52AM +0000, PG Doc comments form wrote:
>> The following documentation comment has been logged on the website:
>>
>> Page: https://www.postgresql.org/docs/10/static/queries-with.html
>> Description:
>>
>> Hi. I have found
>> [DOC](https://www.postgresql.org/docs/10/static/queries-with.html)
>>
>> it is fine, but did not cover multiple WITH in one query.
>>
>> I found answer only [here](https://stackoverflow.com/a/38137037/4632019)
>>
>> May you please add the example:
>>
>> WITH table1 AS (...), table2 AS (...) SELECT * FROM table1, table2
>
> Well, the SELECT manual has:
>
> [ WITH [ RECURSIVE ] with_query [, ...] ]
>
> and with_query is shown as:
>
> with_query_name [ ( column_name [, ...] ) ] AS ( select | values | insert | update | delete )
>
> This is standard SQL. I don't think we are going to be able to show
> every possible syntax.
>
> --
> Bruce Momjian <[email protected]> http://momjian.us
> EnterpriseDB http://enterprisedb.com
>
> + As you are, so once was I. As I am, so you will be. +
> + Ancient Roman grave inscription +
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Documentation does not cover multiple WITH in one query
2018-08-22 09:24 Documentation does not cover multiple WITH in one query PG Doc comments form <[email protected]>
2018-08-24 20:29 ` Re: Documentation does not cover multiple WITH in one query Bruce Momjian <[email protected]>
2018-08-26 09:08 ` Re: Documentation does not cover multiple WITH in one query KES <[email protected]>
@ 2018-08-26 13:15 ` Bruce Momjian <[email protected]>
0 siblings, 0 replies; 4+ messages in thread
From: Bruce Momjian @ 2018-08-26 13:15 UTC (permalink / raw)
To: KES <[email protected]>; +Cc: [email protected] <[email protected]>
On Sun, Aug 26, 2018 at 12:08:15PM +0300, KES wrote:
>
> Thank you. That is I am looking for.
> Never thought that 'WITH' syntax is described at 'SELECT'.
>
> Will be very helpful if this will be mentioned on this page: https://www.postgresql.org/docs/10/static/queries-with.html
> For an example:
>
> [ WITH [ RECURSIVE ] with_query [, ...] ]
>
> and with_query is shown as:
>
> with_query_name [ ( column_name [, ...] ) ] AS ( select | values | insert | update | delete )
>
> For full syntax of `WITH` see https://www.postgresql.org/docs/10/static/sql-select.html
There is are no syntax layouts on this page or in similar sections in
the docs --- they are reserved for the reference pages. I don't think
it makes sense to add it here. One odd thing is that WITH can be used
with non-SELECT statements, but we only document it in SELECT, which is
odd. I think that is because the SQL standard only uses WITH with
SELECT.
--
Bruce Momjian <[email protected]> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2018-08-26 13:15 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-08-22 09:24 Documentation does not cover multiple WITH in one query PG Doc comments form <[email protected]>
2018-08-24 20:29 ` Bruce Momjian <[email protected]>
2018-08-26 09:08 ` KES <[email protected]>
2018-08-26 13:15 ` Bruce Momjian <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox