renameatt() can rename attribute of index, sequence, ...

Поиск
Список
Период
Сортировка
От KaiGai Kohei
Тема renameatt() can rename attribute of index, sequence, ...
Дата
Msg-id 4B8DC72F.3050600@ak.jp.nec.com
обсуждение исходный текст
Ответы Re: renameatt() can rename attribute of index, sequence, ...  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: renameatt() can rename attribute of index, sequence, ...  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Is it an expected behavior?
 postgres=> CREATE SEQUENCE s; CREATE SEQUENCE postgres=> ALTER TABLE s RENAME sequence_name TO abcd; ALTER TABLE
 postgres=> CREATE TABLE t (a int primary key, b text); NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"t_pkey"for table "t" CREATE TABLE postgres=> ALTER TABLE t_pkey RENAME a TO xyz; ALTER TABLE
 

The documentation says: http://developer.postgresql.org/pgdocs/postgres/sql-altertable.html
   : RENAME   The RENAME forms change the name of a table (or an index, sequence, or view) or   the name of an
individualcolumn in a table. There is no effect on the stored data.
 

It seems to me the renameatt() should check relkind of the specified relation, and
raise an error if relkind != RELKIND_RELATION.

-- 
KaiGai Kohei <kaigai@ak.jp.nec.com>


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: plperl _init settings
Следующее
От: Tom Lane
Дата:
Сообщение: Re: renameatt() can rename attribute of index, sequence, ...