pgsql: Fix bugs in relpersistence handling during table creation.
От | Robert Haas |
---|---|
Тема | pgsql: Fix bugs in relpersistence handling during table creation. |
Дата | |
Msg-id | E1QdUVh-0001wb-20@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Fix bugs in relpersistence handling during table creation. Unlike the relistemp field which it replaced, relpersistence must be set correctly quite early during the table creation process, as we rely on it quite early on for a number of purposes, including security checks. Normally, this is set based on whether the user enters CREATE TABLE, CREATE UNLOGGED TABLE, or CREATE TEMPORARY TABLE, but a relation may also be made implicitly temporary by creating it in pg_temp. This patch fixes the handling of that case, and also disables creation of unlogged tables in temporary tablespace (such table indeed skip WAL-logging, but we reject an explicit specification) and creation of relations in the temporary schemas of other sessions (which is not very sensible, and didn't work right anyway). Report by Amit Khandekar. Branch ------ REL9_1_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/2b9bb6979df9a742243647b6a368125f5ddf496e Modified Files -------------- src/backend/catalog/namespace.c | 57 ++++++++++++++++++++++------- src/backend/commands/tablecmds.c | 13 ++++--- src/backend/commands/typecmds.c | 1 + src/backend/commands/view.c | 27 ++++++++------ src/backend/executor/execMain.c | 13 ++++--- src/backend/parser/parse_utilcmd.c | 4 ++ src/include/catalog/namespace.h | 1 + src/test/regress/expected/create_view.out | 4 +- 8 files changed, 81 insertions(+), 39 deletions(-)
В списке pgsql-committers по дате отправления: