mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Applied Joachim's patch for a --regression option.
Made this option mark the .c files, so the environment variable is no longer needed. Created a special MinGW file with the special error message. Do not print port into log file when running regression tests.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.32 2006/10/04 00:30:11 momjian Exp $ */
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.33 2007/01/11 15:47:33 meskes Exp $ */
|
||||
|
||||
#define POSTGRES_ECPG_INTERNAL
|
||||
#include "postgres_fe.h"
|
||||
@ -28,6 +28,8 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern int ecpg_internal_regression_mode;
|
||||
|
||||
static struct sqlca_t sqlca_init =
|
||||
{
|
||||
{
|
||||
@ -262,7 +264,7 @@ ECPGlog(const char *format,...)
|
||||
* regression tests set this environment variable to get the same
|
||||
* output for every run.
|
||||
*/
|
||||
if (getenv("ECPG_REGRESSION"))
|
||||
if (ecpg_internal_regression_mode)
|
||||
snprintf(f, bufsize, "[NO_PID]: %s", format);
|
||||
else
|
||||
snprintf(f, bufsize, "[%d]: %s", (int) getpid(), format);
|
||||
@ -272,7 +274,7 @@ ECPGlog(const char *format,...)
|
||||
va_end(ap);
|
||||
|
||||
/* dump out internal sqlca variables */
|
||||
if (getenv("ECPG_REGRESSION"))
|
||||
if (ecpg_internal_regression_mode)
|
||||
fprintf(debugstream, "[NO_PID]: sqlca: code: %ld, state: %s\n",
|
||||
sqlca->sqlcode, sqlca->sqlstate);
|
||||
|
||||
|
Reference in New Issue
Block a user