Re: Typed table DDL loose ends

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Typed table DDL loose ends
Дата
Msg-id 1303155893.14718.6.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на Typed table DDL loose ends  (Noah Misch <noah@leadboat.com>)
Ответы Re: Typed table DDL loose ends  (Noah Misch <noah@leadboat.com>)
Re: Typed table DDL loose ends  (Noah Misch <noah@leadboat.com>)
Список pgsql-hackers
On Sat, 2011-04-09 at 21:57 -0400, Noah Misch wrote:
> * Table row types used in typed tables vs. ALTER TABLE

This item was addressed, but the other ones were not, I think.

> * Inheriting from a typed table blocks further type DDL
>   CREATE TYPE t AS (x int);
>   CREATE TABLE parent OF t;
>   CREATE TABLE child () INHERITS (parent);
>   ALTER TYPE t ADD ATTRIBUTE y int CASCADE;
>   -- ERROR:  column must be added to child tables too
> We ought to just set INH_YES on the downstream command in ATTypedTableRecursion.
> If we get to that point, the user did choose ALTER TYPE CASCADE; it seems fair
> to assume he'd want inheritance recursion rather than a later error.

Agreed.

> * Users can CREATE TABLE OF on a type they don't own
> This in turns blocks the owner's ability to alter the table/type.  However, we
> already have this hazard with composite-type columns.  A TODO to address this
> broadly seems in order, but it's not a 9.1 issue.

I think we should change that to mirror the inheritance policy: you have
to be the owner of the "parent".  Note that this is newly relevant in
9.1, because you couldn't change composite types before.

> * Can create a permanent table using a temp table row type
>   CREATE TEMP TABLE tempt ();
>   CREATE TABLE permt OF tempt; -- silently dropped on session exit
> Looks easy to fix, with no policy questions.

This is now prohibited.



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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Formatting Curmudgeons WAS: MMAP Buffers
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Open issues for collations