git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 33aaa13) | patch
Improve behavior of concurrent ALTER TABLE, and do some refactoring.
Sat, 7 Jan 2012 03:42:26 +0000 (22:42 -0500)
Sat, 7 Jan 2012 03:42:26 +0000 (22:42 -0500)
commit 1489e2f26a4c0318938b3085f50976512f321d84
Improve behavior of concurrent ALTER TABLE, and do some refactoring.

ALTER TABLE (and ALTER VIEW, ALTER SEQUENCE, etc.) now use a
RangeVarGetRelid callback to check permissions before acquiring a table
lock. We also now use the same callback for all forms of ALTER TABLE,
rather than having separate, almost-identical callbacks for ALTER TABLE
.. SET SCHEMA and ALTER TABLE .. RENAME, and no callback at all for
everything else.

I went ahead and changed the code so that no form of ALTER TABLE works
on foreign tables; you must use ALTER FOREIGN TABLE instead. In 9.1,
it was possible to use ALTER TABLE .. SET SCHEMA or ALTER TABLE ..
RENAME on a foreign table, but not any other form of ALTER TABLE, which
did not seem terribly useful or consistent.

Patch by me; review by Noah Misch.
src/backend/commands/alter.c diff | blob | blame | history
src/backend/commands/tablecmds.c diff | blob | blame | history
src/backend/tcop/utility.c diff | blob | blame | history
src/include/commands/tablecmds.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /