Re: ALTER TABLE .. OWNER TO and sequences - Mailing list pgsql-patches

From Tom Lane
Subject Re: ALTER TABLE .. OWNER TO and sequences
Date
Msg-id 14308.1095981979@sss.pgh.pa.us
Whole thread Raw
In response to ALTER TABLE .. OWNER TO and sequences  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-patches
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> Here is a patch regarding ALTER TABLE ... OWNER and the sequences that
> were created by a SERIAL column.

Applied with some changes.  I tightened up the checks on the pg_depend
entries, just for paranoia's sake.  (At the moment I don't think there
could be any entries that would wrongly get by the tests you had, but
I'd rather verify that it's an INTERNAL dependency, for instance.)

> Additionally, it forbids directly changing the owner of a
> SERIAL sequence

I did not apply this part because it's inconsistent with the behavior
for indexes.  If you want to argue that we should disallow changing
index ownership separately as well, we can talk about that ...

> I also added some regression tests for ALTER TABLE ... OWNER, because
> previously there wasn't any.

I didn't apply these either, because I thought them more likely to cause
bogus regression failures than detect any real problems in the field.
Two reasons they could do so are (1) running the regress tests as a
superuser other than ID 1; (2) running the tests in an installation that
already has a userid 42.  We could avoid (2) by reporting user names
instead of sysids, but that doesn't fix the superuser problem.

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: doc patch for ssl in server
Next
From: Neil Conway
Date:
Subject: Re: trivial cleanup: ExecProcAppend