ecpg regression test failures caused by window functions patch
It hadn't occurred to me to try the ecpg tests before committing the
window functions patch :-(. It looks like those grammar additions have
resulted in whitespace changes in a lot of the test outputs. Would you
confirm that there's nothing seriously wrong and update the output
files?
It strikes me that it might be a good idea to change cat2_str to not
insert a space when obviously not necessary, perhaps along the lines
of
cat2_str(char *str1, char *str2)
{
char * res_str = (char *)mm_alloc(strlen(str1) + strlen(str2) + 2);
strcpy(res_str, str1);
- strcat(res_str, " ");
+ if (strlen(str1) != 0 && strlen(str2) != 0)
+ strcat(res_str, " ");
strcat(res_str, str2);
free(str1);
free(str2);
return(res_str);
}
It looks like this would reduce the vulnerability of the ecpg tests to
whitespace changes caused by "insignificant" grammar changes.
regards, tom lane
[Sorry, have essantially be offline since yesterday. My server didn't ocme up again. Sight. ]
On Sun, Dec 28, 2008 at 03:21:16PM -0500, Tom Lane wrote:
It hadn't occurred to me to try the ecpg tests before committing the
window functions patch :-(. It looks like those grammar additions have
resulted in whitespace changes in a lot of the test outputs. Would you
confirm that there's nothing seriously wrong and update the output
files?
Compiler is running atm, will commit changes (if needed) asap.
It strikes me that it might be a good idea to change cat2_str to not
insert a space when obviously not necessary, perhaps along the lines
ofcat2_str(char *str1, char *str2)
{
char * res_str = (char *)mm_alloc(strlen(str1) + strlen(str2) + 2);strcpy(res_str, str1); - strcat(res_str, " "); + if (strlen(str1) != 0 && strlen(str2) != 0) + strcat(res_str, " "); strcat(res_str, str2); free(str1); free(str2); return(res_str); }
Hey, good idea, will add this too.
Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!
Michael Meskes <meskes@postgresql.org> writes:
On Sun, Dec 28, 2008 at 03:21:16PM -0500, Tom Lane wrote:
It strikes me that it might be a good idea to change cat2_str to not
insert a space when obviously not necessary, perhaps along the lines
of
Hey, good idea, will add this too.
I just tried that and it seems you'd need to make another couple of
changes --- the "fetch" test fails for instance, probably because
something somewhere isn't recognizing a fetch command.
regards, tom lane
On Mon, Dec 29, 2008 at 11:39:16AM -0500, Tom Lane wrote:
I just tried that and it seems you'd need to make another couple of
changes --- the "fetch" test fails for instance, probably because
something somewhere isn't recognizing a fetch command.
Actually this was a test that expected the blank and thus looked into $1[1]
instead of $1[0]. :-)
I hope I found all of these.
Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go VfL Borussia! Go SF 49ers! Use Debian GNU/Linux! Use PostgreSQL!