3 #define POSTGRES_ECPG_INTERNAL
24 sqlca->sqlcode = code;
68 ecpg_gettext(
"invalid input syntax for type int: \"%s\", on line %d"),
str, line);
75 ecpg_gettext(
"invalid input syntax for type unsigned int: \"%s\", on line %d"),
str, line);
82 ecpg_gettext(
"invalid input syntax for floating-point type: \"%s\", on line %d"),
str, line);
90 ecpg_gettext(
"invalid syntax for type boolean: \"%s\", on line %d"),
str, line);
95 ecpg_gettext(
"could not convert boolean value: size mismatch, on line %d"), line);
109 ecpg_gettext(
"null value without indicator on line %d"), line);
116 ecpg_gettext(
"variable does not have an array type on line %d"), line);
123 ecpg_gettext(
"data read from server is not an array on line %d"), line);
130 ecpg_gettext(
"inserting an array of variables is not supported on line %d"), line);
137 ecpg_gettext(
"connection \"%s\" does not exist on line %d"),
str, line);
144 ecpg_gettext(
"not connected to connection \"%s\" on line %d"),
str, line);
165 ecpg_gettext(
"descriptor index out of range on line %d"), line);
172 ecpg_gettext(
"unrecognized descriptor item \"%s\" on line %d"),
str, line);
179 ecpg_gettext(
"variable does not have a numeric type on line %d"), line);
186 ecpg_gettext(
"variable does not have a character type on line %d"), line);
193 ecpg_gettext(
"error in transaction processing on line %d"), line);
200 ecpg_gettext(
"could not connect to database \"%s\" on line %d"),
str, line);
211 sqlca->sqlerrm.sqlerrml = strlen(
sqlca->sqlerrm.sqlerrmc);
212 ecpg_log(
"raising sqlcode %d on line %d: %s\n", code, line,
sqlca->sqlerrm.sqlerrmc);
253 message =
ecpg_gettext(
"the connection to the server was lost");
258 snprintf(
sqlca->sqlerrm.sqlerrmc,
sizeof(
sqlca->sqlerrm.sqlerrmc),
"%s on line %d", message, line);
259 sqlca->sqlerrm.sqlerrml = strlen(
sqlca->sqlerrm.sqlerrmc);
265 if (strncmp(
sqlca->sqlstate,
"23505",
sizeof(
sqlca->sqlstate)) == 0)
267 else if (strncmp(
sqlca->sqlstate,
"21000",
sizeof(
sqlca->sqlstate)) == 0)
272 ecpg_log(
"raising sqlstate %.*s (sqlcode %ld): %s\n",
317 ecpg_log(
"ecpg_check_PQresult on line %d: COPY IN data transfer in progress\n", lineno);
323 ecpg_log(
"ecpg_check_PQresult on line %d: unknown execution status type\n",
344 sqlca->sqlerrm.sqlerrmc[
sqlca->sqlerrm.sqlerrml] =
'\0';
#define ECPG_CONVERT_BOOL
#define ECPG_UNKNOWN_DESCRIPTOR
#define ECPG_TOO_MANY_ARGUMENTS
#define ECPG_TOO_FEW_ARGUMENTS
#define ECPG_ARRAY_INSERT
#define ECPG_FLOAT_FORMAT
#define ECPG_UNKNOWN_DESCRIPTOR_ITEM
#define ECPG_MISSING_INDICATOR
#define ECPG_INVALID_DESCRIPTOR_INDEX
#define ECPG_INVALID_STMT
#define ECPG_SUBSELECT_NOT_ONE
#define ECPG_INFORMIX_SUBSELECT_NOT_ONE
#define ECPG_VAR_NOT_NUMERIC
#define ECPG_VAR_NOT_CHAR
#define ECPG_OUT_OF_MEMORY
#define ECPG_DUPLICATE_KEY
#define ECPG_DATA_NOT_ARRAY
#define ECPG_INFORMIX_DUPLICATE_KEY
#define ECPG_SQLSTATE_ECPG_INTERNAL_ERROR
void ecpg_log(const char *format,...) pg_attribute_printf(1
bool ecpg_check_PQresult(PGresult *results, int lineno, PGconn *connection, enum COMPAT_MODE compat)
void ecpg_raise(int line, int code, const char *sqlstate, const char *str)
void ecpg_raise_backend(int line, PGresult *result, PGconn *conn, int compat)
char * PQerrorMessage(const PGconn *conn)
ConnStatusType PQstatus(const PGconn *conn)
ExecStatusType PQresultStatus(const PGresult *res)
char * PQresultErrorMessage(const PGresult *res)
int PQendcopy(PGconn *conn)
char * PQresultErrorField(const PGresult *res, int fieldcode)
struct sqlca_t * ECPGget_sqlca(void)
void ECPGfree_auto_mem(void)
#define PG_DIAG_MESSAGE_PRIMARY