Re: Bootstrap DATA is a pita

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bootstrap DATA is a pita
Дата
Msg-id 16236.1449870402@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Bootstrap DATA is a pita  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: Bootstrap DATA is a pita  (Mark Dilger <hornschnorter@gmail.com>)
Re: Bootstrap DATA is a pita  (Caleb Welton <cwelton@pivotal.io>)
Список pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Crazy idea: we could just have a CSV file which can be loaded into a
> table for mass changes using regular DDL commands, then dumped back from
> there into the file.  We already know how to do these things, using
> \copy etc.  Since CSV uses one line per entry, there would be no merge
> problems either (or rather: all merge problems would become conflicts,
> which is what we want.)

That's an interesting proposal.  It would mean that the catalog files
stay at more or less their current semantic level (direct representations
of bootstrap catalog contents), but it does sound like a more attractive
way to perform complex edits than writing Emacs macros ;-).

You could actually do that the hard way right now, with a bit of script
to convert between DATA lines and CSV format.  But if we anticipate that
becoming the standard approach, it would definitely make sense to migrate
the master copies into CSV or traditional COPY format, and teach BKI mode
to read that (or, perhaps, leave bootstrap.c alone and modify the code
that produces the .bki file).

This is somewhat orthogonal to the question of whether we want to do
things like converting noncritical operator-class definitions into
regular CREATE OPERATOR CLASS syntax.  There's almost certainly going
to be some hard core of catalog entries that aren't amenable to that,
and will still need to be loaded from data files of some sort.
        regards, tom lane



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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Parallel Aggregate
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: REASSIGN OWNED doesn't know how to deal with USER MAPPINGs