[PATCH] Skip ALTER x SET SCHEMA if the schema didn't change

Поиск
Список
Период
Сортировка
От Marti Raudsepp
Тема [PATCH] Skip ALTER x SET SCHEMA if the schema didn't change
Дата
Msg-id CABRT9RCy8kvXFSdNPQjKr9tC9CMfepTtds1A8w2PG6Sg3CbmYQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: [PATCH] Skip ALTER x SET SCHEMA if the schema didn't change  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Список pgsql-hackers
Hi list

The attached patch changes the behavior of multiple ALTER x SET SCHEMA
commands, to skip, rather than fail, when the old and new schema is
the same.

The advantage is that it's now easier to write DDL scripts that are indempotent.

This already matches the behavior of ALTER EXTENSION SET SCHEMA in
earlier versions, as well as many other SET-ish commands, e.g. ALTER
TABLE SET TABLESPACE, OWNER TO, CLUSTER ON, SET (storage_parameter...)
etc. I don't see why SET SCHEMA should be treated any differently.

The code is written such that object_access_hook is still called for
each object.

Regression tests included. I couldn't find any documentation that
needs changing.

Regards,
Marti

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: BRIN Scan: Optimize memory allocation in function 'bringetbitmap'
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Doubt in pgbench TPS number