diff options
author | Tom Lane | 2010-11-02 21:15:35 +0000 |
---|---|---|
committer | Tom Lane | 2010-11-02 21:15:35 +0000 |
commit | 2868b0cbe061724b7d46234cf053f7fdb3672600 (patch) | |
tree | c3288645a70a7881f2b831092a6b4afb02864921 /src/backend/tcop/postgres.c | |
parent | c0486e9dea9135d434b0451becab91bee28aa7ad (diff) |
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/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions