Re: Misleading CREATE TABLE error

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Misleading CREATE TABLE error
Дата
Msg-id CA+TgmoaXWt9okr+fwvBCTJKa9DYv5sBV8LApV924X=nNi+vEtA@mail.gmail.com
обсуждение исходный текст
Ответ на Misleading CREATE TABLE error  (Thom Brown <thom@linux.com>)
Ответы Re: Misleading CREATE TABLE error  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
On Tue, Nov 8, 2011 at 4:49 PM, Thom Brown <thom@linux.com> wrote:
> I found the following error message misleading:
>
> test=# create table cows2 (LIKE cows);
> ERROR:  inherited relation "cows" is not a table
> STATEMENT:  create table cows2 (LIKE cows);
>
> I'm not trying to inherit a relation, I'm trying to base a table on
> it.  As it happens, "cows" is a foreign table, which *is* a table,
> just not a regular table.  It might be useful to add support to clone
> foreign tables into regular tables, the use-case being that you may
> wish to import all the data locally into a table of the same
> structure.  But the gripe here is the suggestion that the relation
> would have been inherited, which would actually be achieved using
> INHERITS.

Interesting.  I agree that there's no obvious reason why that
shouldn't be allowed to work.  Could be useful with views, too.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [Feature Request] \dx show "options"
Следующее
От: Emanuel Calvo
Дата:
Сообщение: Re: [Feature Request] \dx show "options"