I wrote:
> It looks to me like the simplest way to make this happen would require
> (a) adding a field to CreateSeqStmt to carry the userID we want the
> sequence to be owned by;
> (b) adding a parameter to DefineRelation to pass in said userID.
> We could in theory back-patch this, since CreateSe
Josh Berkus writes:
> However, given that the issue has existed for a year or more and I'm the
> first one to report it formally, it clearly isn't that huge of an issue.
Longer than that.
> Any idea what version this got broken in?
Presumably, when we added ALTER SEQUENCE OWNED BY, which seems
> We could in theory back-patch this, since CreateSeqStmt won't ever go to
> disk in stored rules. However, tweaking DefineRelation's API in stable
> branches seems fairly hazardous to third-party code. Does it seem
> sufficient to fix the problem in 9.0 and up?
Might be worth asking a few inte
Josh Berkus writes:
> [ as suitably privileged user, alter somebody else's table with ]
> alter table sometable add column someserial serial;
> ERROR: sequence must have same owner as table it is linked to
> If the creating user has permissions on the table sufficient to create a
> column on the
Severity: Minor
Version tested: 8.4.4
Platform: Solaris 10u8
Steps to reproduce:
1. Create table "sometable" owned by user "someuser", and fill it with a
million generate_series records.
2. Log in as the superuser "postgres".
3. Do:
alter table sometable add column someserial serial;
4. Postgr