Yury Bokhoncovich <byg@center-f1.ru> writes:
> 2) I (admin) have a few tables as owner and wanna give another user
> (programmer) ability to create/drop any necessary indices. At the same
> time I do not wanna give him (her) a chance to drop/alter the table
> itself.
But keep in mind that CREATE UNIQUE INDEX does alter the table, in
the sense that subsequent operations may fail where they'd not have
done before. Conversely, dropping a unique index may allow logically
invalid data to be inserted. Also, dropping an index may cause important
operations to take vastly longer than they're expected to. So giving
away the right to manipulate indexes is at the very least an opening
to denial-of-service problems.
In any case, what you are really suggesting here is that we offer a
grantable "right to create/drop indexes" on a *table*. Dangerous or
not, it could be useful. But it has nothing that I can see to do with
a notion of ownership of the indexes themselves; there's still no visible
reason to consider the indexes to have ownership independent of the
table they're on.
regards, tom lane