Re: create table with a CTE

From: Post Gresql <postgresql(at)taljaren(dot)se>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: create table with a CTE
Date: 2020-11-15 06:05:20
Message-ID: 3c2db253-db4f-3189-3bc1-205cb3397fb5@taljaren.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On 2020-11-15 04:55, David G. Johnston wrote:
> On Sat, Nov 14, 2020 at 6:21 AM PG Doc comments form
> <noreply(at)postgresql(dot)org <mailto:noreply(at)postgresql(dot)org>> wrote:
>
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/13/sql-createtableas.html
> Description:
>
> Hi.
> I think you should include an example on how to create a table
> from a query
> that uses a CTE in the query.
>
>
> [shrug]
> The obvious attempt to specify:
>
> create table cte_tbl as
> WITH cte (val) AS (select 1)
> SELECT * FROM cte;
>
> works so I'm not really sure that such an example adds valuable insight.

That is probably a totaly worthless example for a experienced user.

The only insight would be for a new user that "oh, I can do it like that".

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Post Gresql 2020-11-15 06:13:17 Re: 42.6.8 trapping errors
Previous Message David G. Johnston 2020-11-15 04:53:28 Re: Range partitioning and overlap