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

Commit6e2cf34

Browse files
author
Michael Meskes
committed
Better test the content of the SQLSTATE string in ecpglib than the pointer.
1 parent2a0dec7 commit6e2cf34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎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.24 2010/03/05 13:57:08 meskes Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/error.c,v 1.25 2010/03/08 12:15:24 meskes Exp $ */
22

33
#definePOSTGRES_ECPG_INTERNAL
44
#include"postgres_fe.h"
@@ -306,7 +306,7 @@ ecpg_raise_backend(int line, PGresult *result, PGconn *conn, int compat)
306306
message=PQerrorMessage(conn);
307307
}
308308

309-
if (sqlstate==ECPG_SQLSTATE_ECPG_INTERNAL_ERROR)
309+
if (strcmp(sqlstate,ECPG_SQLSTATE_ECPG_INTERNAL_ERROR)==0)
310310
{
311311
/* we might get here if the connection breaks down, so let's
312312
* check for this instead of giving just the generic internal error */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp