Creating a zero-column table
| От | Tom Lane |
|---|---|
| Тема | Creating a zero-column table |
| Дата | |
| Msg-id | 5291.1039727286@sss.pgh.pa.us обсуждение исходный текст |
| Ответы |
Re: Creating a zero-column table
Re: Creating a zero-column table Re: Creating a zero-column table |
| Список | pgsql-hackers |
I was bemused to notice that pg_dump is currently unable to dump the
regression database. The domain regression test leaves an empty table
(one with zero columns), which causes pg_dump to produce
--
-- TOC entry 172 (OID 675837)
-- Name: domnotnull; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE domnotnull (
);
This is rejected on restore:
ERROR: DefineRelation: please inherit from a relation or define an attribute
I believe that the table would be correctly restored if we simply
removed that error check in DefineRelation. On the other hand, for
ordinary hand-entered CREATE TABLE commands it seems like a useful
error check.
Should we remove this error check, thereby effectively making
zero-column tables first-class citizens? If not, what shall we say to
people who complain that their dump is broken?
regards, tom lane
В списке pgsql-hackers по дате отправления: