Re: ALTER TABLE OWNER: change indexes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: ALTER TABLE OWNER: change indexes
Date: 2002-02-24 22:43:07
Message-ID: 12921.1014590587@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

BTW, I forgot to inquire about *why* you needed to look up a relation
name. As things stand I think you've coded it okay, but this will need
to change for schemas: a relation name isn't going to be a unique
identifier much longer.

It'd probably be best to redesign the ALTER TABLE routines so that
the recursive execution routine accepts a relation OID rather than a
relation name, with a front-end routine that does a one-time name-to-
OID lookup. Recursion using OID will be simpler than recursion using
name, for both child-table and index cases. And it won't break for
schemas.

Perhaps this could be done as part of the overall refactoring of the
ALTER code that someone (I forget who) was going to look at doing.

This doesn't need to be done just to make this patch acceptable, but
I thought I'd better mention that it needs to be done soon.

Another point that maybe does need immediate attention: as coded,
reassignment of ownership of a table won't affect the associated
TOAST table, if any. Should it?

regards, tom lane

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2002-02-24 23:20:09 Re: ALTER TABLE OWNER: change indexes
Previous Message Neil Conway 2002-02-24 22:04:34 Re: ALTER TABLE OWNER: change indexes