Re: [PATCHES] windows progname / regression fixes
Andrew Dunstan wrote: Attached are 2 patches and one additional alternative contrib regression test file (for cube). The patches fix a misleading message in pg_regress.sh, and strip the .exe suffix from the result of get_progname() as previously discussed. This lets us get much further with contrib regression tests - there are 2 remaining issues preventing a clean run - one odd one in the seg module and a path issue in tsearch2. I am looking into these. (Why am I bothered with all this? Because I want the buildfarm system to run on Windows). I have changed the .exe patch to use pg_strcasecmp() rather than stricmp(), and changed it to use sizeof(EXE) rather than '4'. Patch attached and applied. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 Index: src/port/path.c === RCS file: /cvsroot/pgsql/src/port/path.c,v retrieving revision 1.38 diff -c -c -r1.38 path.c *** src/port/path.c 27 Oct 2004 17:17:09 - 1.38 --- src/port/path.c 1 Nov 2004 04:21:56 - *** *** 195,202 #if defined(__CYGWIN__) || defined(WIN32) /* strip .exe suffix, regardless of case */ ! if (strlen(nodir_name) 4 ! stricmp(nodir_name + (strlen(nodir_name) - 4), EXE) == 0) { char *progname; --- 195,202 #if defined(__CYGWIN__) || defined(WIN32) /* strip .exe suffix, regardless of case */ ! if (strlen(nodir_name) sizeof(EXE) ! pg_strcasecmp(nodir_name + strlen(nodir_name) - sizeof(EXE), EXE) == 0) { char *progname; *** *** 206,212 fprintf(stderr, %s: out of memory\n, nodir_name); exit(1); } ! progname[strlen(progname) - 4] = '\0'; nodir_name = progname; } #endif --- 206,212 fprintf(stderr, %s: out of memory\n, nodir_name); exit(1); } ! progname[strlen(progname) - sizeof(EXE)] = '\0'; nodir_name = progname; } #endif ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
Re: [PATCHES] windows progname / regression fixes
Andrew Dunstan [EMAIL PROTECTED] writes: Attached are 2 patches and one additional alternative contrib regression test file (for cube). The patches fix a misleading message in pg_regress.sh, and strip the .exe suffix from the result of get_progname() as previously discussed. Applied. regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send unregister YourEmailAddressHere to [EMAIL PROTECTED])
Re: [PATCHES] windows progname / regression fixes
I will add some comments to the code when applying. Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers reviews and approves it. --- Andrew Dunstan wrote: Attached are 2 patches and one additional alternative contrib regression test file (for cube). The patches fix a misleading message in pg_regress.sh, and strip the .exe suffix from the result of get_progname() as previously discussed. This lets us get much further with contrib regression tests - there are 2 remaining issues preventing a clean run - one odd one in the seg module and a path issue in tsearch2. I am looking into these. (Why am I bothered with all this? Because I want the buildfarm system to run on Windows). One odd thing I have noticed in testing, is that dropping the regression database takes a *very* long time, especially after the third or fourth go, and I see messages about not being able to remove the directory, which means rmtree() is failing somehow. cheers andrew -- -- Test cube datatype -- -- -- first, define the datatype. Turn off echoing so that expected file -- does not depend on contents of cube.sql. -- \set ECHO none psql:cube.sql:10: NOTICE: type cube is not yet defined DETAIL: Creating a shell type definition. psql:cube.sql:15: NOTICE: argument type cube is only a shell -- -- testing the input and output functions -- -- Any number (a one-dimensional point) SELECT '1'::cube AS cube; cube -- (1) (1 row) SELECT '-1'::cube AS cube; cube -- (-1) (1 row) SELECT '1.'::cube AS cube; cube -- (1) (1 row) SELECT '-1.'::cube AS cube; cube -- (-1) (1 row) SELECT '.1'::cube AS cube; cube --- (0.1) (1 row) SELECT '-.1'::cube AS cube; cube (-0.1) (1 row) SELECT '1.0'::cube AS cube; cube -- (1) (1 row) SELECT '-1.0'::cube AS cube; cube -- (-1) (1 row) SELECT '1e27'::cube AS cube; cube -- (1e+027) (1 row) SELECT '-1e27'::cube AS cube; cube --- (-1e+027) (1 row) SELECT '1.0e27'::cube AS cube; cube -- (1e+027) (1 row) SELECT '-1.0e27'::cube AS cube; cube --- (-1e+027) (1 row) SELECT '1e+27'::cube AS cube; cube -- (1e+027) (1 row) SELECT '-1e+27'::cube AS cube; cube --- (-1e+027) (1 row) SELECT '1.0e+27'::cube AS cube; cube -- (1e+027) (1 row) SELECT '-1.0e+27'::cube AS cube; cube --- (-1e+027) (1 row) SELECT '1e-7'::cube AS cube; cube -- (1e-007) (1 row) SELECT '-1e-7'::cube AS cube; cube --- (-1e-007) (1 row) SELECT '1.0e-7'::cube AS cube; cube -- (1e-007) (1 row) SELECT '-1.0e-7'::cube AS cube; cube --- (-1e-007) (1 row) SELECT '1e-700'::cube AS cube; cube -- (0) (1 row) SELECT '-1e-700'::cube AS cube; cube -- (0) (1 row) SELECT '1234567890123456'::cube AS cube; cube - (1.23456789012346e+015) (1 row) SELECT '+1234567890123456'::cube AS cube; cube - (1.23456789012346e+015) (1 row) SELECT '-1234567890123456'::cube AS cube; cube -- (-1.23456789012346e+015) (1 row) SELECT '.1234567890123456'::cube AS cube; cube - (0.123456789012346) (1 row) SELECT '+.1234567890123456'::cube AS cube; cube - (0.123456789012346) (1 row) SELECT '-.1234567890123456'::cube AS cube; cube -- (-0.123456789012346) (1 row) -- simple lists (points) SELECT '1,2'::cube AS cube; cube (1, 2) (1 row) SELECT '(1,2)'::cube AS cube; cube (1, 2) (1 row) SELECT '1,2,3,4,5'::cube AS cube; cube - (1, 2, 3, 4, 5) (1 row) SELECT '(1,2,3,4,5)'::cube AS cube; cube - (1, 2, 3, 4, 5) (1 row) -- double lists (cubes) SELECT '(0),(0)'::cube AS cube; cube -- (0) (1 row) SELECT '(0),(1)'::cube AS cube; cube - (0),(1) (1 row) SELECT '[(0),(0)]'::cube AS cube; cube -- (0) (1 row) SELECT '[(0),(1)]'::cube AS cube; cube - (0),(1) (1 row) SELECT '(0,0,0,0),(0,0,0,0)'::cube AS cube; cube -- (0, 0, 0, 0) (1 row) SELECT '(0,0,0,0),(1,0,0,0)'::cube AS cube; cube --- (0, 0, 0, 0),(1, 0, 0, 0) (1 row) SELECT '[(0,0,0,0),(0,0,0,0)]'::cube AS cube; cube
[PATCHES] windows progname / regression fixes
Attached are 2 patches and one additional alternative contrib regression test file (for cube). The patches fix a misleading message in pg_regress.sh, and strip the .exe suffix from the result of get_progname() as previously discussed. This lets us get much further with contrib regression tests - there are 2 remaining issues preventing a clean run - one odd one in the seg module and a path issue in tsearch2. I am looking into these. (Why am I bothered with all this? Because I want the buildfarm system to run on Windows). One odd thing I have noticed in testing, is that dropping the regression database takes a *very* long time, especially after the third or fourth go, and I see messages about not being able to remove the directory, which means rmtree() is failing somehow. cheers andrew -- -- Test cube datatype -- -- -- first, define the datatype. Turn off echoing so that expected file -- does not depend on contents of cube.sql. -- \set ECHO none psql:cube.sql:10: NOTICE: type cube is not yet defined DETAIL: Creating a shell type definition. psql:cube.sql:15: NOTICE: argument type cube is only a shell -- -- testing the input and output functions -- -- Any number (a one-dimensional point) SELECT '1'::cube AS cube; cube -- (1) (1 row) SELECT '-1'::cube AS cube; cube -- (-1) (1 row) SELECT '1.'::cube AS cube; cube -- (1) (1 row) SELECT '-1.'::cube AS cube; cube -- (-1) (1 row) SELECT '.1'::cube AS cube; cube --- (0.1) (1 row) SELECT '-.1'::cube AS cube; cube (-0.1) (1 row) SELECT '1.0'::cube AS cube; cube -- (1) (1 row) SELECT '-1.0'::cube AS cube; cube -- (-1) (1 row) SELECT '1e27'::cube AS cube; cube -- (1e+027) (1 row) SELECT '-1e27'::cube AS cube; cube --- (-1e+027) (1 row) SELECT '1.0e27'::cube AS cube; cube -- (1e+027) (1 row) SELECT '-1.0e27'::cube AS cube; cube --- (-1e+027) (1 row) SELECT '1e+27'::cube AS cube; cube -- (1e+027) (1 row) SELECT '-1e+27'::cube AS cube; cube --- (-1e+027) (1 row) SELECT '1.0e+27'::cube AS cube; cube -- (1e+027) (1 row) SELECT '-1.0e+27'::cube AS cube; cube --- (-1e+027) (1 row) SELECT '1e-7'::cube AS cube; cube -- (1e-007) (1 row) SELECT '-1e-7'::cube AS cube; cube --- (-1e-007) (1 row) SELECT '1.0e-7'::cube AS cube; cube -- (1e-007) (1 row) SELECT '-1.0e-7'::cube AS cube; cube --- (-1e-007) (1 row) SELECT '1e-700'::cube AS cube; cube -- (0) (1 row) SELECT '-1e-700'::cube AS cube; cube -- (0) (1 row) SELECT '1234567890123456'::cube AS cube; cube - (1.23456789012346e+015) (1 row) SELECT '+1234567890123456'::cube AS cube; cube - (1.23456789012346e+015) (1 row) SELECT '-1234567890123456'::cube AS cube; cube -- (-1.23456789012346e+015) (1 row) SELECT '.1234567890123456'::cube AS cube; cube - (0.123456789012346) (1 row) SELECT '+.1234567890123456'::cube AS cube; cube - (0.123456789012346) (1 row) SELECT '-.1234567890123456'::cube AS cube; cube -- (-0.123456789012346) (1 row) -- simple lists (points) SELECT '1,2'::cube AS cube; cube (1, 2) (1 row) SELECT '(1,2)'::cube AS cube; cube (1, 2) (1 row) SELECT '1,2,3,4,5'::cube AS cube; cube - (1, 2, 3, 4, 5) (1 row) SELECT '(1,2,3,4,5)'::cube AS cube; cube - (1, 2, 3, 4, 5) (1 row) -- double lists (cubes) SELECT '(0),(0)'::cube AS cube; cube -- (0) (1 row) SELECT '(0),(1)'::cube AS cube; cube - (0),(1) (1 row) SELECT '[(0),(0)]'::cube AS cube; cube -- (0) (1 row) SELECT '[(0),(1)]'::cube AS cube; cube - (0),(1) (1 row) SELECT '(0,0,0,0),(0,0,0,0)'::cube AS cube; cube -- (0, 0, 0, 0) (1 row) SELECT '(0,0,0,0),(1,0,0,0)'::cube AS cube; cube --- (0, 0, 0, 0),(1, 0, 0, 0) (1 row) SELECT '[(0,0,0,0),(0,0,0,0)]'::cube AS cube; cube -- (0, 0, 0, 0) (1 row) SELECT '[(0,0,0,0),(1,0,0,0)]'::cube AS cube; cube --- (0, 0, 0, 0),(1, 0, 0, 0) (1 row) -- invalid input: parse errors SELECT ''::cube AS cube; ERROR: bad cube representation DETAIL: syntax error at end of input SELECT 'ABC'::cube AS cube; ERROR: bad cube representation DETAIL: syntax error at or near A SELECT '()'::cube AS cube; ERROR: bad cube representation DETAIL: syntax error at or near ) SELECT '[]'::cube AS cube; ERROR: bad cube representation DETAIL: syntax error at or near ] SELECT '[()]'::cube AS cube; ERROR: bad cube representation