Re: [HACKERS] initdb.c::main() too large

2012-12-03 Thread Bruce Momjian
On Fri, Nov 30, 2012 at 06:06:39PM -0500, Andrew Dunstan wrote: On 11/30/2012 04:45 PM, Bruce Momjian wrote: On Thu, Nov 29, 2012 at 11:12:23PM -0500, Bruce Momjian wrote: In looking to add an fsync-only option to initdb, I found its main() function to be 743 lines long, and very hard to

Re: [HACKERS] initdb.c::main() too large

2012-11-30 Thread Bruce Momjian
On Thu, Nov 29, 2012 at 11:23:59PM -0500, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: In looking to add an fsync-only option to initdb, I found its main() function to be 743 lines long, and very hard to understand. The attached patch moves much of that code into separate

Re: [HACKERS] initdb.c::main() too large

2012-11-30 Thread Bruce Momjian
On Thu, Nov 29, 2012 at 11:12:23PM -0500, Bruce Momjian wrote: In looking to add an fsync-only option to initdb, I found its main() function to be 743 lines long, and very hard to understand. The attached patch moves much of that code into separate functions, which will make initdb.c easier

Re: [HACKERS] initdb.c::main() too large

2012-11-30 Thread Andrew Dunstan
On 11/30/2012 04:45 PM, Bruce Momjian wrote: On Thu, Nov 29, 2012 at 11:12:23PM -0500, Bruce Momjian wrote: In looking to add an fsync-only option to initdb, I found its main() function to be 743 lines long, and very hard to understand. The attached patch moves much of that code into separate

Re: [HACKERS] initdb.c::main() too large

2012-11-30 Thread Bruce Momjian
On Fri, Nov 30, 2012 at 06:06:39PM -0500, Andrew Dunstan wrote: On 11/30/2012 04:45 PM, Bruce Momjian wrote: On Thu, Nov 29, 2012 at 11:12:23PM -0500, Bruce Momjian wrote: In looking to add an fsync-only option to initdb, I found its main() function to be 743 lines long, and very hard to

Re: [HACKERS] initdb.c::main() too large

2012-11-29 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: In looking to add an fsync-only option to initdb, I found its main() function to be 743 lines long, and very hard to understand. The attached patch moves much of that code into separate functions, which will make initdb.c easier to understand, and easier