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,
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:
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
Buenos Aires, Argentina
pgsql-hackers by date
|Next:||From: Heikki Linnakangas||Date: 2008-11-14 17:23:51|
|Subject: Re: Synchronous replication patch v2|
|Previous:||From: Tom Lane||Date: 2008-11-14 17:13:30|
|Subject: Re: pgsql: Enable script to generate preproc.y in build process. |