Re: create table with a CTE

2020-11-14 Thread Post Gresql

On 2020-11-15 04:55, David G. Johnston wrote:
On Sat, Nov 14, 2020 at 6:21 AM PG Doc comments form 
mailto:nore...@postgresql.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".




Re: 42.6.8 trapping errors

2020-11-14 Thread Post Gresql

On 2020-11-15 04:39, David G. Johnston wrote:
On Saturday, November 14, 2020, PG Doc comments form 
mailto:nore...@postgresql.org>> wrote:


The following documentation comment has been logged on the website:

Page:
https://www.postgresql.org/docs/13/plpgsql-control-structures.html

Description:

Hi
I think that section should have more examples with the most
common errors,
like for example no_data_found when doing a select.


Why?

David J.


I think it would be helpful from the perspective for an inexperienced user.