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

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 77459eb) | patch
Ensure an index that uses a whole-row Var still depends on its table.
Tue, 2 Nov 2010 21:15:13 +0000 (17:15 -0400)
Tue, 2 Nov 2010 21:15:13 +0000 (17:15 -0400)
commit e84bf651216a80c1d0c0d14901dea244c6a333ab
Ensure an index that uses a whole-row Var still depends on its table.

We failed to record any dependency on the underlying table for an index
declared like "create index i on t (foo(t.*))". This would create trouble
if the table were dropped without previously dropping the index. To fix,
simplify some overly-cute code in index_create(), accepting the possibility
that sometimes the whole-table dependency will be redundant. Also document
this hazard in dependency.c. Per report from Kevin Grittner.

In passing, prevent a core dump in pg_get_indexdef() if the index's table
can't be found. I came across this while experimenting with Kevin's
example. Not sure it's a real issue when the catalogs aren't corrupt, but
might as well be cautious.

Back-patch to all supported versions.
src/backend/catalog/dependency.c diff | blob | blame | history
src/backend/catalog/index.c diff | blob | blame | history
src/backend/utils/adt/ruleutils.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

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