Column reordering in pg_dump

Поиск
Список
Период
Сортировка
От hernan gonzalez
Тема Column reordering in pg_dump
Дата
Msg-id 48692c2d0811140921v4504162ctb2c22b53e2f1b5c9@mail.gmail.com
обсуждение исходный текст
Ответы Re: Column reordering in pg_dump  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi.
As I wanted to change the order of columns of some tables (I know, I
know, my code does not depend
on that; but I prefer that \dt gives me a more organized ouput...)
I've added an option to pg_dump to reorder
columns in the ouput "CREATE TABLE" dump.
The specified order is given in a external file (one column by line,
format "scheme.tablename.colname"),
you only need to write the desired columns to reorder.
I've done it for my own use, minimal testing, etc; but the code is
quite simple and has little coupling
with the rest; and very little risk, IMO.
The code (reoder.c and patched pg_dump.c) is here:http://hjg.com.ar/tech/prog/pg_dump_reorder/
See the README.txt, and the comments at reorder.c.
If the dev team is interested in adding this little feature to the
core, delighted (in that case, I guess the code
needs some polishing, and perhaps revise terminology, options names,
modify man page, etc)
If not, there it is so the people interested can use it.

BTW: I've been using Postgresql since ten years ago, and it rocks. Congrats.

--
Hernán J. González
http://hjg.com.ar/
Buenos Aires, Argentina


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Simple postgresql.conf wizard
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Synchronous replication patch v2