Bruce Momjian <[EMAIL PROTECTED]> writes:
> I modified pg_regress.c to use just the return code to determine if the
> diff worked, but I added in a WIN32-specific test for the file size.  I
> think that is the cleanest solution.  Attached.

It really needs a comment, along the lines of

         * On Windows we'll get exit status 1 if the diff invocation
         * failed; so we need a way to distinguish failure from "files
         * are different".  Check to make sure that a diff file was
         * created and is nonempty.

Also the test ought to account for file_size returning -1 if file's
not there, so

+ #ifdef WIN32
+       if (WEXITSTATUS(r) == 1 && file_size(filename) <= 0)

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?


Reply via email to