Please make a note regarding the PL/pgSQL FOUND variable

2023-11-04 Thread PG Doc comments form
The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/16/sql-createtableas.html Description: Since I was recently bitten by the fact that CREATE TABLE AS doesn't set the PL/pgSQL variable FOUND, it would be nice if that were explicitly noted in

Re: Please make a note regarding the PL/pgSQL FOUND variable

2023-11-04 Thread Tom Lane
PG Doc comments form writes: > Since I was recently bitten by the fact that CREATE TABLE AS doesn't set the > PL/pgSQL variable FOUND, it would be nice if that were explicitly noted in > the documentation. Alternatively, if it COULD set the FOUND variable, that > would be great, although I realiz

Re: Please make a note regarding the PL/pgSQL FOUND variable

2023-11-04 Thread Thomas Trias
Perhaps it could be explicitly stated on that page, then? Part of the confusion arises from the semantic differences between SELECT INTO and CREATE TABLE AS SELECT solely as used within PL/pgSQL, which is exacerbated for people coming from a different SQL variant, such as T-SQL. I agree that the do