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

Commiteb730cf

Browse files
author
Michael Meskes
committed
Added correct error handling in DESCRIBE statement processing by Boszormenyi Zoltan <zb@cybertec.at>.
1 parentd3be71a commiteb730cf

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* dynamic SQL support routines
22
*
3-
* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/descriptor.c,v 1.34 2010/01/1510:44:34 meskes Exp $
3+
* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/descriptor.c,v 1.35 2010/01/1513:19:12 meskes Exp $
44
*/
55

66
#definePOSTGRES_ECPG_INTERNAL
@@ -739,14 +739,24 @@ ECPGdescribe(int line, int compat, bool input, const char *connection_name, cons
739739

740740
/* DESCRIBE INPUT is not yet supported */
741741
if (input)
742+
{
743+
ecpg_raise(line,ECPG_UNSUPPORTED,ECPG_SQLSTATE_ECPG_INTERNAL_ERROR,"DESCRIBE INPUT");
742744
returnret;
745+
}
743746

744747
con=ecpg_get_connection(connection_name);
745748
if (!con)
746-
return false;
749+
{
750+
ecpg_raise(line,ECPG_NO_CONN,ECPG_SQLSTATE_CONNECTION_DOES_NOT_EXIST,
751+
connection_name ?connection_name :ecpg_gettext("NULL"));
752+
returnret;
753+
}
747754
prep=ecpg_find_prepared_statement(stmt_name,con,NULL);
748755
if (!prep)
756+
{
757+
ecpg_raise(line,ECPG_INVALID_STMT,ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME,stmt_name);
749758
returnret;
759+
}
750760

751761
va_start(args,stmt_name);
752762

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp