Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0941a89

Browse files
author
Michael Meskes
committed
Fixed bug 2330: Wrong error code in case of a duplicate key
1 parent92f5bfc commit0941a89

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1993,6 +1993,10 @@ Tu Feb 7 18:48:14 CET 2006
19931993

19941994
- Bit field notation belongs to a variable not a variable list.
19951995
- Output of line number only done by one function.
1996+
1997+
Fri, 17 Mar 2006 16:38:19 +0100
1998+
1999+
- Fixed bug 2330: Wrong error code in case of a duplicate key
19962000
- Set ecpg library version to 5.2.
19972001
- Set ecpg version to 4.2.1.
19982002

‎src/interfaces/ecpg/ecpglib/error.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/error.c,v 1.11 2005/10/15 02:49:47 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/error.c,v 1.12 2006/03/17 15:46:13 meskes Exp $ */
22

33
#definePOSTGRES_ECPG_INTERNAL
44
#include"postgres_fe.h"
@@ -186,7 +186,7 @@ ECPGraise_backend(int line, PGresult *result, PGconn *conn, int compat)
186186
/* assign SQLCODE for backward compatibility */
187187
if (strncmp(sqlca->sqlstate,"23505",sizeof(sqlca->sqlstate))==0)
188188
sqlca->sqlcode=INFORMIX_MODE(compat) ?ECPG_INFORMIX_DUPLICATE_KEY :ECPG_DUPLICATE_KEY;
189-
if (strncmp(sqlca->sqlstate,"21000",sizeof(sqlca->sqlstate))==0)
189+
elseif (strncmp(sqlca->sqlstate,"21000",sizeof(sqlca->sqlstate))==0)
190190
sqlca->sqlcode=INFORMIX_MODE(compat) ?ECPG_INFORMIX_SUBSELECT_NOT_ONE :ECPG_SUBSELECT_NOT_ONE;
191191
else
192192
sqlca->sqlcode=ECPG_PGSQL;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp