Re: Using ALTER TABLESPACE in pg_dump

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Using ALTER TABLESPACE in pg_dump
Дата
Msg-id 17650.1098210042@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Using ALTER TABLESPACE in pg_dump  (Philip Warner <pjw@rhyme.com.au>)
Ответы Re: Using ALTER TABLESPACE in pg_dump  (Philip Warner <pjw@rhyme.com.au>)
Список pgsql-hackers
Philip Warner <pjw@rhyme.com.au> writes:
> DEFINITION: CREATE TABLE fred ... %%tablespace%% ...
> TABLESPACE: ' TABLESPACE t'

> pg_restore would read these, and use the settings from the command line to 
> either substitute an empty string or the TABLESPACE text for %%tablespace%% 
> in the DEFINTION.

Nope.  I can break that trivially, eg:

CREATE INDEX fooi ON foo (f1) WHERE upper(f1) < ' %%tablespace%%';

Not very probable, maybe, but you can't just do a blind sed-style
substitution.

There's also the nontrivial matter of how pg_dump would decide where to
insert the %%tablespace%% string into the CREATE INDEX command in the
first place.  If we're going to add code to parse CREATE INDEX and
insert the tablespace in the correct place, meseems it'd be better to
insert it on the pg_restore side.
        regards, tom lane


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

Предыдущее
От: Philip Warner
Дата:
Сообщение: Re: Using ALTER TABLESPACE in pg_dump
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: Time off