Обсуждение: upgrade from 8.0.3 to 8.1.10 crash

Поиск
Список
Период
Сортировка

upgrade from 8.0.3 to 8.1.10 crash

От
"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 0000 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

 

Re: upgrade from 8.0.3 to 8.1.10 crash

От
"Boergesson, Cheryl"
Дата:

I found when I removed all comments, it worked fine.  Any ideas?

 


From: pgsql-hackers-owner@postgresql.org [mailto:pgsql-hackers-owner@postgresql.org] 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 0000 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

 

Re: upgrade from 8.0.3 to 8.1.10 crash

От
Alvaro Herrera
Дата:
Boergesson, Cheryl wrote:
> I found when I removed all comments, it worked fine.  Any ideas?

I suggest you add "ECPG" to the subject line so that the relevant
developers notice your problem.


-- 
Alvaro Herrera                 http://www.amazon.com/gp/registry/CTMLCN8V17R4
"The Postgresql hackers have what I call a "NASA space shot" mentality.Quite refreshing in a world of "weekend drag
racer"developers."
 
(Scott Marlowe)


ECPG crash - upgrade from 8.0.3 to 8.1.10

От
"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 0000 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: upgrade from 8.0.3 to 8.1.10 crash

От
Tom Lane
Дата:
"Boergesson, Cheryl" <Cheryl.Boergesson@gdit.com> writes:
> I found when I removed all comments, it worked fine.  Any ideas?

Oh?  Considering that the fragments you've shown us have never had
one single comment, that means that no one could possibly have offered
you any useful advice.

Please, if you would like help with this sort of problem, show a complete
self-contained test case.  Leaving stuff out is counterproductive, way
too often.
        regards, tom lane


Re: ECPG crash - upgrade from 8.0.3 to 8.1.10

От
Michael Meskes
Дата:
On Thu, Oct 18, 2007 at 03:36:34PM -0400, Boergesson, Cheryl wrote:
> 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.
> ...
> Oddly, when I removed all comments, it worked fine.

Which comments?

Michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!


Re: ECPG crash - upgrade from 8.0.3 to 8.1.10

От
"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 0000 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

 

 

Re: ECPG crash - upgrade from 8.0.3 to 8.1.10

От
Michael Meskes
Дата:
On Mon, Oct 22, 2007 at 10:07:03AM -0400, Boergesson, Cheryl wrote:
> The program below works with PostgreSQL 8.0.3, but not 8.1.10.  The
> error I receive is:
> ...

Is there a way for you to compile and run the program without threading?
Or try with CVS head instead of 8.1.10?

Michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!