why "alter table" to change owner of sequence?

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: why "alter table" to change owner of sequence?
Date: 2007-12-10 10:12:13
Message-ID: 20071210101213.GA30552@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

if i create sequence m and then want to change it's owner to some other
account i have to issue:
alter table <sequence_name> owner to ...;

why can't it be: alter sequence?

example:

# create sequence x;
CREATE SEQUENCE

# \d
List of relations
Schema | Name | Type | Owner
--------+------+----------+--------
public | x | sequence | depesz
(1 row)

# alter sequence x owner to pgdba;
ERROR: syntax error at or near "owner"
LINE 1: alter sequence x owner to pgdba;
^
# alter table x owner to pgdba;
ALTER TABLE

# \d
List of relations
Schema | Name | Type | Owner
--------+------+----------+-------
public | x | sequence | pgdba
(1 row)

depesz

--
quicksil1er: "postgres is excellent, but like any DB it requires a
highly paid DBA. here's my CV!" :)
http://www.depesz.com/ - blog dla ciebie (i moje CV)

Browse pgsql-bugs by date

  From Date Subject
Next Message Gregory Stark 2007-12-10 11:19:14 Re: BUG #3811: Getting multiple values from a sequence generator
Previous Message Andrew Dunstan 2007-12-10 02:48:47 Re: [HACKERS] BUG #3799: csvlog skips some logs