Require ownership permission for CREATE INDEX, per bug report.
Tom Lane <tgl@sss.pgh.pa.us>
Require ownership permission for CREATE INDEX, per bug report. Disallow CREATE INDEX on system catalogs, non-tables (views, sequences, etc). Disallow CREATE/DROP TRIGGER on system catalogs, non-tables. Disallow ALTER TABLE ADD/DROP CONSTRAINT on system catalogs. Disallow FOREIGN KEY reference to non-table. None of these things can actually work in the present system structure, but the code was letting them pass without complaint.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/command.c | modified | +8 −3 |
| src/backend/commands/indexcmds.c | modified | +18 −7 |
| src/backend/commands/trigger.c | modified | +15 −2 |
| src/backend/parser/analyze.c | modified | +9 −1 |
| src/backend/tcop/utility.c | modified | +8 −1 |