Folks,
Having blank lines in -f scripts was causing silent failures. This
fixes it, for some value of "fixes." If it's OK, please apply to 8.1
CURRENT and CVS TIP :)
Cheers,
D
--
David Fetter [EMAIL PROTECTED] http://fetter.org/
phone: +1 415 235 3778
Remember to vote!
Index: contrib/pgbench/pgbench.c
===================================================================
RCS file: /projects/cvsroot/pgsql/contrib/pgbench/pgbench.c,v
retrieving revision 1.46
diff -c -r1.46 pgbench.c
*** contrib/pgbench/pgbench.c 22 Nov 2005 18:17:04 -0000 1.46
--- contrib/pgbench/pgbench.c 23 Nov 2005 02:41:42 -0000
***************
*** 886,896 ****
{
Command *commands;
! commands = process_commands(buf);
! if (commands == NULL)
! {
! fclose(fd);
! return false;
}
my_commands[lineno] = commands;
--- 886,902 ----
{
Command *commands;
!
! if (strncmp(buf, "\n", 1) != 0) {
! commands = process_commands(buf);
! if (commands == NULL)
! {
! fclose(fd);
! return false;
! }
! } else {
! lineno++;
! continue;
}
my_commands[lineno] = commands;
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq