Re: create table liek view

Поиск
Список
Период
Сортировка
От Ragnar
Тема Re: create table liek view
Дата
Msg-id 1186527470.5778.405.camel@localhost.localdomain
обсуждение исходный текст
Ответ на create table liek view  ("Filip Rembiałkowski" <plk.zuber@gmail.com>)
Список pgsql-general
On þri, 2007-08-07 at 15:23 +0200, Filip Rembiałkowski wrote:
> filip@filip=# create view v as select 1::int;
> CREATE VIEW
> filip@filip=# select * from v;
>  int4
> ------
>     1
> (1 row)
> filip@filip=# create table t ( like v);
> ERROR:  inherited relation "v" is not a table
>
>
>
> Why? Is there any logical reason for this? View is just a table with
> some rule ON SELECT...

i do not know about the reason this is not allowed, but you can:

create table t as select * from v limit 0;



gnari



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

Предыдущее
От: Decibel!
Дата:
Сообщение: Re: array_to_set functions
Следующее
От: Decibel!
Дата:
Сообщение: Re: finding out vacuum completion %, and vacuum VS vacuum full