1998-05-06 15:03:47 +02:00
|
|
|
#ifndef _ECPG_ERROR_H
|
|
|
|
#define _ECPG_ERROR_H
|
|
|
|
|
1998-05-18 18:05:05 +02:00
|
|
|
#include <errno.h>
|
|
|
|
|
1998-05-06 15:03:47 +02:00
|
|
|
/* This is a list of all error codes the embedded SQL program can return */
|
1998-09-01 06:40:42 +02:00
|
|
|
#define ECPG_NO_ERROR 0
|
1998-05-06 15:03:47 +02:00
|
|
|
#define ECPG_NOT_FOUND 100
|
|
|
|
|
1998-05-18 18:05:05 +02:00
|
|
|
/* system error codes returned by ecpglib get the correct number,
|
|
|
|
* but are made negative
|
|
|
|
*/
|
|
|
|
#define ECPG_OUT_OF_MEMORY -ENOMEM
|
|
|
|
|
|
|
|
/* first we have a set of ecpg messages, they start at 200 */
|
2000-03-01 13:49:43 +01:00
|
|
|
#define ECPG_UNSUPPORTED -200
|
2000-04-12 19:17:23 +02:00
|
|
|
#define ECPG_TOO_MANY_ARGUMENTS -201
|
2000-03-01 13:49:43 +01:00
|
|
|
#define ECPG_TOO_FEW_ARGUMENTS -202
|
|
|
|
#define ECPG_TOO_MANY_MATCHES -203
|
|
|
|
#define ECPG_INT_FORMAT -204
|
|
|
|
#define ECPG_UINT_FORMAT -205
|
|
|
|
#define ECPG_FLOAT_FORMAT -206
|
|
|
|
#define ECPG_CONVERT_BOOL -207
|
|
|
|
#define ECPG_EMPTY -208
|
|
|
|
#define ECPG_MISSING_INDICATOR -209
|
|
|
|
#define ECPG_NO_ARRAY -210
|
|
|
|
#define ECPG_DATA_NOT_ARRAY -211
|
|
|
|
|
|
|
|
#define ECPG_NO_CONN -220
|
|
|
|
#define ECPG_NOT_CONN -221
|
|
|
|
|
|
|
|
#define ECPG_INVALID_STMT -230
|
1999-02-20 08:01:08 +01:00
|
|
|
|
2000-02-16 17:18:29 +01:00
|
|
|
/* dynamic SQL related */
|
2000-03-01 13:49:43 +01:00
|
|
|
#define ECPG_UNKNOWN_DESCRIPTOR -240
|
2000-02-16 17:18:29 +01:00
|
|
|
#define ECPG_INVALID_DESCRIPTOR_INDEX -241
|
2000-02-22 20:57:12 +01:00
|
|
|
#define ECPG_UNKNOWN_DESCRIPTOR_ITEM -242
|
2000-03-01 13:49:43 +01:00
|
|
|
#define ECPG_VAR_NOT_NUMERIC -243
|
|
|
|
#define ECPG_VAR_NOT_CHAR -244
|
2000-02-16 17:18:29 +01:00
|
|
|
|
1998-08-25 13:57:06 +02:00
|
|
|
/* finally the backend error messages, they start at 400 */
|
2000-03-01 13:49:43 +01:00
|
|
|
#define ECPG_PGSQL -400
|
|
|
|
#define ECPG_TRANS -401
|
|
|
|
#define ECPG_CONNECT -402
|
1998-05-06 15:03:47 +02:00
|
|
|
|
1998-09-01 06:40:42 +02:00
|
|
|
#endif /* !_ECPG_ERROR_H */
|