From: | Thom Brown <thom(at)linux(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Misleading CREATE TABLE error |
Date: | 2011-11-08 21:49:27 |
Message-ID: | CAA-aLv4HYjZOp0+4HO++4jRxJMQAz+ea+o_dTEbxJ2J+f-zCpQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
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.
--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Treat | 2011-11-08 22:07:58 | Re: Measuring relation free space |
Previous Message | Thom Brown | 2011-11-08 21:40:18 | Re: Materialized views |