Re: Fixing invalid owners on pg_toast tables in 8.3.5

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Fixing invalid owners on pg_toast tables in 8.3.5
Дата
Msg-id 27254.1235237450@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Fixing invalid owners on pg_toast tables in 8.3.5  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I wrote:
> [ scratches head... ]  That example fails to misbehave for me in 8.3.6,

Oh, wait, you omitted a step from the example: the ALTER has to be done
as somebody other than the table owner (eg a superuser, else you'd not
have the needed permissions).

regression=# create user a;
CREATE ROLE
regression=# \c - a
psql (8.4devel)
You are now connected to database "regression" as user "a".
regression=> create table toaster (
  bread varchar(7000));
CREATE TABLE
regression=> select typowner from pg_type join pg_class on (typname=relname) where
pg_class.oid in (select reltoastrelid from pg_class where
relname='toaster');
 typowner
----------
    63977
(1 row)

regression=> \c - postgres
psql (8.4devel)
You are now connected to database "regression" as user "postgres".
regression=# alter table toaster ALTER bread type varchar(9000);
ALTER TABLE
regression=# select typowner from pg_type join pg_class on (typname=relname) where
pg_class.oid in (select reltoastrelid from pg_class where
relname='toaster');
 typowner
----------
       10
(1 row)

Yeah, that's a bug.  It probably hasn't got anything to do with the
other toast-table weirdnesses we've heard about, but it's a bug.

            regards, tom lane

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

Предыдущее
От: Will Harrower
Дата:
Сообщение: Pointers in custom types
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Pointers in custom types