Re: [HACKERS] Documentation improvements for partitioning
От | Robert Haas |
---|---|
Тема | Re: [HACKERS] Documentation improvements for partitioning |
Дата | |
Msg-id | CA+TgmoYkUvMONhjC=738-MSkwx86DwZLr-gqvXq8WU+3hBCLFw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Documentation improvements for partitioning (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>) |
Список | pgsql-hackers |
On Thu, Feb 16, 2017 at 7:15 AM, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> wrote: >> I think 0001 is better than the status quo, but I'm wondering whether >> we should try to do something slightly different. Maybe it should >> always work for the child table to specify neither WITH OIDS nor >> WITHOUT OIDS, but if you do specify one of them then it has to be the >> one that matches the parent partitioned table? With this patch, IIUC, >> WITH OIDS is allowed only if the parent has the same, but WITHOUT OIDS >> is allowed (but ignored) regardless of the parent setting. > > With the patch, one can always specify (or not) WITH/WITHOUT OIDS when > creating partitions. If WITH OIDS is specified and the parent doesn't > have OIDs, then an error is raised. Then just like with normal > inheritance, WITHOUT OIDS specification for a partition will be > *overridden* if the parent has OIDs. By the way, CREATE TABLE page says > this about inheritance and OIDS: > > (If the new table inherits from any tables that have OIDs, then > <literal>OIDS=TRUE</> is forced even if the command says > <literal>OIDS=FALSE</>. > > Hopefully it's clear to someone reading "If the table inherits from any > tables ..." that it also refers to creating partition of a partitioned table. I rewrote this to be a bit more explicit and committed it. I noticed that there was some duplication here: the old text said both this: A partition cannot have columns other than those inherited from the parent. And also this just a little later in the same page: A partition must have the same column names and types as the table of which it is a partition. The second wording seemed better, so I moved that statement a little higher up and rejiggered the wording to be super-clear about OIDs. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: