Re: [HACKERS] ECPG crash - upgrade from 8.0.3 to 8.1.10

2007-10-22 Thread Boergesson, Cheryl
The program below works with PostgreSQL 8.0.3, but not 8.1.10.  The
error I receive is:

 

Runtime Error!

 

Program: C:\testSQL.exe

 

This application has requested the Runtime to terminate it in an unusual
way.

Please contact the application's support team for more information.

 

This happens on the "exec sql commit work" line.  If I remove the
comments, it works with both 8.0.3 and 8.1.10.  If I change the comments
(add a line, delete a line, etc.) it continues to crash, but sometimes
it will crash on the "exec sql begin work" line.  The connection works
fine -sqlca.sqlcode is 0, sqlca.sqlstate is  and sqlca.sqlwarn is
blank

 

I am running on WindowsXP and compiling with Visual C++ 6.0.

 

I ran ecpg versions 8.0.3 and 8.1.10 on the file, then compared the
created .c files.  According to KDiff, the files are identical, except
for the first comment line saying which version of ecpg was used.

 

Here's the testSQL.pgc code:

 

/* add a comment */

 

/* and another */

 

/* one more */

 

main (int argc, char **argv)

{

  printf ("connect\n");

  exec sql connect to mdllt_db as mdllt_cnxtn;

  printf ("connection results:\n");

  printf ("code: %d\n", sqlca.sqlcode);

  printf ("state: %s\n", sqlca.sqlstate);

  printf ("warn: %s\n", sqlca.sqlwarn);

  

  exec sql begin work;

  printf ("begin results:\n");

  printf ("code: %d\n", sqlca.sqlcode);

  printf ("state: %s\n", sqlca.sqlstate);

  printf ("warn: %s\n", sqlca.sqlwarn);

  

  exec sql commit work;

  printf ("end\n");

  return 0;

}

 

Thanks for any help.

-Cheryl

 

 



[HACKERS] ECPG crash - upgrade from 8.0.3 to 8.1.10

2007-10-18 Thread Boergesson, Cheryl
Hello.  I am trying to upgrade from PostgreSQL 8.0.3 to PostgreSQL
8.1.10.  I'm on WindowsXP and I'm compiling with Visual C++ 6.0.

 

I have a very simple routine that works fine with the 8.0.3 version:

 

int easy_connect()

{

exec sql connect to my_db as my_cnxtn;

printf ("connection results:\n");

printf ("code: %d\n", sqlca.sqlcode);

printf ("state: %s\n", sqlca.sqlstate);

printf ("warn: %s\n", sqlca.sqlwarn);

exec sql begin work;

exec sql commit work;

return 0;

}

 

When I use the 8.1.10 version, the connection works ( sqlca.sqlcode is
0, sqlca.sqlstate is  and sqlca.sqlwarn is blank).  But it then
crashes on the "exec sql begin work" line.

 

I get the following error in a window:

 

Runtime Error!

 

Program: C:\testSQL.exe

 

This application has requested the Runtime to terminate it in an unusual
way.

Please contact the application's support team for more information.

 

I removed the 8.0.3 version using "remove program" from the control
panel.  I then went and removed my C:\Program Files\PostgreSQL\8.0
folder, just to make sure I was not including the wrong header files,
linking to the wrong libraries, or calling the wrong version of
ecpg.exe.

 

Oddly, when I removed all comments, it worked fine.

 

Thanks for any help.

-Cheryl

 



Re: [HACKERS] upgrade from 8.0.3 to 8.1.10 crash

2007-10-18 Thread Boergesson, Cheryl
I found when I removed all comments, it worked fine.  Any ideas?

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Boergesson,
Cheryl
Sent: Thursday, October 18, 2007 9:24 AM
To: pgsql-hackers@postgresql.org
Subject: [HACKERS] upgrade from 8.0.3 to 8.1.10 crash

 

Hello.  I am trying to upgrade from PostgreSQL 8.0.3 to PostgreSQL
8.1.10.  I'm on WindowsXP and I'm compiling with Visual C++ 6.0.

 

I have a very simple routine that works fine with the 8.0.3 version:

 

int easy_connect()

{

exec sql connect to my_db as my_cnxtn;

printf ("connection results:\n");

printf ("code: %d\n", sqlca.sqlcode);

printf ("state: %s\n", sqlca.sqlstate);

printf ("warn: %s\n", sqlca.sqlwarn);

exec sql begin work;

exec sql commit work;

return 0;

}

 

When I use the 8.1.10 version, the connection works ( sqlca.sqlcode is
0, sqlca.sqlstate is  and sqlca.sqlwarn is blank).  But it then
crashes on the "exec sql begin work" line.

 

I get the following error in a window:

 

Runtime Error!

 

Program: C:\testSQL.exe

 

This application has requested the Runtime to terminate it in an unusual
way.

Please contact the application's support team for more information.

 

I removed the 8.0.3 version using "remove program" from the control
panel.  I then went and removed my C:\Program Files\PostgreSQL\8.0
folder, just to make sure I was not including the wrong header files,
linking to the wrong libraries, or calling the wrong version of
ecpg.exe.

 

Thanks for any help.

-Cheryl

 



[HACKERS] upgrade from 8.0.3 to 8.1.10 crash

2007-10-18 Thread Boergesson, Cheryl
Hello.  I am trying to upgrade from PostgreSQL 8.0.3 to PostgreSQL
8.1.10.  I'm on WindowsXP and I'm compiling with Visual C++ 6.0.

 

I have a very simple routine that works fine with the 8.0.3 version:

 

int easy_connect()

{

exec sql connect to my_db as my_cnxtn;

printf ("connection results:\n");

printf ("code: %d\n", sqlca.sqlcode);

printf ("state: %s\n", sqlca.sqlstate);

printf ("warn: %s\n", sqlca.sqlwarn);

exec sql begin work;

exec sql commit work;

return 0;

}

 

When I use the 8.1.10 version, the connection works ( sqlca.sqlcode is
0, sqlca.sqlstate is  and sqlca.sqlwarn is blank).  But it then
crashes on the "exec sql begin work" line.

 

I get the following error in a window:

 

Runtime Error!

 

Program: C:\testSQL.exe

 

This application has requested the Runtime to terminate it in an unusual
way.

Please contact the application's support team for more information.

 

I removed the 8.0.3 version using "remove program" from the control
panel.  I then went and removed my C:\Program Files\PostgreSQL\8.0
folder, just to make sure I was not including the wrong header files,
linking to the wrong libraries, or calling the wrong version of
ecpg.exe.

 

Thanks for any help.

-Cheryl