dbTalk Databases Forums  

[BUGS] BUG #2330: ECPGlib: Wrong error code in case of a duplicate key violation

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2330: ECPGlib: Wrong error code in case of a duplicate key violation in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michael Wolff
 
Posts: n/a

Default [BUGS] BUG #2330: ECPGlib: Wrong error code in case of a duplicate key violation - 03-17-2006 , 07:32 AM







The following bug has been logged online:

Bug reference: 2330
Logged by: Michael Wolff
Email address: mwolff (AT) cosa (DOT) de
PostgreSQL version: 8.1.2 & 8.1.3
Operating system: Linux
Description: ECPGlib: Wrong error code in case of a duplicate key
violation
Details:

I figured out an error in the file src/interfaces/ecpg/ecpglib/error.c CVS
version 1.11 in line 189:

The if statement has been preceeded by an else.


original code:
if (strncmp(sqlca->sqlstate, "21000", sizeof(sqlca->sqlstate)) == 0)

fixed code:
else if (strncmp(sqlca->sqlstate, "21000", sizeof(sqlca->sqlstate)) == 0)


Regards,
Michael

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Reply With Quote
  #2  
Old   
Michael Meskes
 
Posts: n/a

Default Re: [BUGS] BUG #2330: ECPGlib: Wrong error code in case of a duplicate key violation - 03-17-2006 , 09:57 AM






Am Freitag, 17. M=C3=A4rz 2006 09:36 schrieb Michael Wolff:
Quote:
The following bug has been logged online:
...
Description: ECPGlib: Wrong error code in case of a duplicate key
Just fixed in CVS HEAD. Thanks for your report.

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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match


Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #2330: ECPGlib: Wrong error code in case of a duplicate key violation - 03-17-2006 , 10:54 PM



Michael Meskes <meskes (AT) postgresql (DOT) org> writes:
Quote:
Am Freitag, 17. März 2006 09:36 schrieb Michael Wolff:
Description: ECPGlib: Wrong error code in case of a duplicate key

Just fixed in CVS HEAD. Thanks for your report.
Wouldn't it be a good idea to back-patch this? At least as far as
8.1.*?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend


Reply With Quote
  #4  
Old   
Michael Meskes
 
Posts: n/a

Default Re: [BUGS] BUG #2330: ECPGlib: Wrong error code in case of a duplicate key violation - 03-19-2006 , 06:35 AM



Quote:
Description: ECPGlib: Wrong error code in case of a duplicate key

Just fixed in CVS HEAD. Thanks for your report.

Wouldn't it be a good idea to back-patch this? At least as far as
8.1.*?
Indeed it is. Sorry, was in a hurry. Since it's such a small patch I also
committed it to 7.4, 8.0 and 8.1.

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 (AT) jabber (DOT) org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.