Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table
Дата
Msg-id 20170502212616.GO21223@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: [HACKERS] pg_dump emits ALTER TABLE ONLY partitioned_table  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-hackers
Amit,

* Amit Langote (Langote_Amit_f8@lab.ntt.co.jp) wrote:
> Now that WITH OPTIONS is optional even for CREATE TABLE OF, perhaps it
> needs to be mentioned in the release notes?

Doesn't strike me as rising to the level of needing to go into the
release notes, but I won't object if people feel that it needs
mentioning.

> Attached updated patches.

Thanks, but aren't the changes for handling pg_dump --binary-upgrade
when dealing with partitions whose parents are in another schema
backwards?

The source schema selected is for the partition, so we don't need to
schema-qualify the partition, but we do need to schema-qualify the
parent because it could be in another schema.  I think the approach to
use is to decide, first, if we need to schema-qualify the parent or not,
then set up a string which has the qualified (if necessary) name of the
parent, and then just use that when appropriate while building the ALTER
TABLE command.  Remember, we select the source schema of the table in
tbinfo at the top of dumpTableSchema() (see 'selectSourceSchema()'), so
it shouldn't ever be necessary to schema-qualify the table in tbinfo.

I've somehow managed to run out of time again today (it's gotten quite
busy lately), but I'll try to find time late tonight to continue working
on this, or I'll be working on it again tomorrow.  This *really* needs
some tests that actually cover this case, as it's clearly not hard to
get confused about what needs to be qualified and what doesn't.

Thanks!

Stephen

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] logical replication syntax (was DROP SUBSCRIPTION,query cancellations and slot handling)
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: [HACKERS] Row Level Security UPDATE Confusion