Re: REGRESS_OPTS versus MSVC build scripts
От | Jeff Janes |
---|---|
Тема | Re: REGRESS_OPTS versus MSVC build scripts |
Дата | |
Msg-id | f67928030908190843m1e7f3bc9m48f4a698721f970e@mail.gmail.com обсуждение исходный текст |
Ответ на | REGRESS_OPTS versus MSVC build scripts (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
> ---------- Forwarded message ---------- > From: David Fetter <david@fetter.org> > To: Andrew Dunstan <andrew@dunslane.net> > Date: Tue, 18 Aug 2009 11:31:41 -0700 > Subject: Re: REGRESS_OPTS versus MSVC build scripts > On Tue, Aug 18, 2009 at 02:15:48PM -0400, Andrew Dunstan wrote: >> >> >> Andrew Dunstan wrote: >>> >> >> Here's an untested patch ... I think it should do the job, however, at >> least for contrib modules, which is the immediate problem. >> >> cheers >> >> andrew >> >> > >> Index: src/tools/msvc/vcregress.pl >> =================================================================== >> RCS file: /cvsroot/pgsql/src/tools/msvc/vcregress.pl,v >> retrieving revision 1.10 >> diff -c -r1.10 vcregress.pl >> *** src/tools/msvc/vcregress.pl 1 Dec 2008 13:39:45 -0000 1.10 >> --- src/tools/msvc/vcregress.pl 18 Aug 2009 18:12:59 -0000 ... >> *** 198,203 **** >> --- 199,223 ---- >> exit $mstat if $mstat; >> } >> >> + sub fetchRegressOpts >> + { >> + my $handle; >> + open($handle,"<Makefile") > > This section is probably better done with Tie::File. No, absolutely not. I would have a hard time believing any computer that would be compiling or testing pg would not have enough memory to slurp a Makefile into memory. And if it did, Tie::File would not be the answer. For files with small line lengths the memory overhead of Tie::File is generally more than the memory savings. And it gives us the added bonus of letting us accidentally change files, when we thought we were just changing an in memory copy. The real solution in that highly unlikely case would be to read the file line by line in a loop, rather than slurping it, as the existing code doesn't search across line boundaries anyway. Cheers, Jeff
В списке pgsql-hackers по дате отправления: