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 the documentation. Alternatively, if it COULD set the FOUND variable, that would be great, although I realize the difficulty of that when coupled with IF NOT EXISTS.