diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-11-02 17:15:07 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-11-02 17:15:07 -0400 |
commit | 9f376e146b2f1fe1bc4d07380f2a047d5c375581 (patch) | |
tree | d88ac433b683f1b5a655710b4e9772548df34a8a /src/backend/access/gist/gistsplit.c | |
parent | 35d5d962e1777560baf6f5edec906a907a853c9a (diff) | |
download | postgresql-9f376e146b2f1fe1bc4d07380f2a047d5c375581.tar.gz postgresql-9f376e146b2f1fe1bc4d07380f2a047d5c375581.zip |
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.
Diffstat (limited to 'src/backend/access/gist/gistsplit.c')
0 files changed, 0 insertions, 0 deletions