Unix Technical Forum

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

This is a discussion on BUG #2330: ECPGlib: Wrong error code in case of a duplicate key violation within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 2330 Logged by: Michael Wolff Email address: mwolff@cosa.de PostgreSQL version: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 10:50 AM
Michael Wolff
 
Posts: n/a
Default BUG #2330: ECPGlib: Wrong error code in case of a duplicate key violation


The following bug has been logged online:

Bug reference: 2330
Logged by: Michael Wolff
Email address: mwolff@cosa.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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 10:50 AM
Michael Meskes
 
Posts: n/a
Default Re: BUG #2330: ECPGlib: Wrong error code in case of a duplicate key violation

Am Freitag, 17. März 2006 09:36 schrieb Michael Wolff:
> 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
--
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!

---------------------------(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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 10:50 AM
Tom Lane
 
Posts: n/a
Default Re: BUG #2330: ECPGlib: Wrong error code in case of a duplicate key violation

Michael Meskes <meskes@postgresql.org> writes:
> 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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 10:50 AM
Michael Meskes
 
Posts: n/a
Default Re: BUG #2330: ECPGlib: Wrong error code in case of a duplicate key violation

> >> 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@jabber.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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:20 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com