Skip site navigation (1) Skip section navigation (2)

ecpg regression test failures caused by window functions patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: ecpg regression test failures caused by window functions patch
Date: 2008-12-28 20:21:16
Message-ID: 9736.1230495676@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
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

Responses

pgsql-hackers by date

Next:From: David RowleyDate: 2008-12-28 21:29:24
Subject: Re: TODO items for window functions
Previous:From: Tom LaneDate: 2008-12-28 19:26:01
Subject: TODO items for window functions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group