Обсуждение: why "alter table" to change owner of sequence?

Поиск
Список
Период
Сортировка

why "alter table" to change owner of sequence?

От
hubert depesz lubaczewski
Дата:
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)