Unable to create table of view row type

Поиск
Список
Период
Сортировка
От Isaac Morland
Тема Unable to create table of view row type
Дата
Msg-id CAMsGm5fdArGBaWVPx1=VbvuDsF11o=+gVLYB4_8DmKWMfWxLZw@mail.gmail.com
обсуждение исходный текст
Список pgsql-hackers
I thought I should be able to do this:

=> create view testv as values (1, 'a'), (2, 'b'), (3, 'c');
CREATE VIEW
=> create table testt of testv;
ERROR:  type testv is not a composite type

But as you can see I can’t. pg_type seems to think the type is composite:

ijmorlan=> select typtype from pg_type where typname = 'testv';
 typtype
─────────
 c
(1 row)

I’m guessing there are good reasons this isn’t supported, so I’m thinking to provide a documentation patch for CREATE TABLE and ALTER TABLE to specify that the type given for OF type_name must be a non-relation-row-type composite type.

Am I missing something?

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: refactoring relation extension and BufferAlloc(), faster COPY
Следующее
От: Greg Stark
Дата:
Сообщение: Commitfest Manager