ecpgerrno.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* src/interfaces/ecpg/include/ecpgerrno.h */
  2. #ifndef _ECPG_ERRNO_H
  3. #define _ECPG_ERRNO_H
  4. #include <errno.h>
  5. /* This is a list of all error codes the embedded SQL program can return */
  6. #define ECPG_NO_ERROR 0
  7. #define ECPG_NOT_FOUND 100
  8. /* system error codes returned by ecpglib get the correct number,
  9. * but are made negative
  10. */
  11. #define ECPG_OUT_OF_MEMORY -ENOMEM
  12. /* first we have a set of ecpg messages, they start at 200 */
  13. #define ECPG_UNSUPPORTED -200
  14. #define ECPG_TOO_MANY_ARGUMENTS -201
  15. #define ECPG_TOO_FEW_ARGUMENTS -202
  16. #define ECPG_TOO_MANY_MATCHES -203
  17. #define ECPG_INT_FORMAT -204
  18. #define ECPG_UINT_FORMAT -205
  19. #define ECPG_FLOAT_FORMAT -206
  20. #define ECPG_NUMERIC_FORMAT -207
  21. #define ECPG_INTERVAL_FORMAT -208
  22. #define ECPG_DATE_FORMAT -209
  23. #define ECPG_TIMESTAMP_FORMAT -210
  24. #define ECPG_CONVERT_BOOL -211
  25. #define ECPG_EMPTY -212
  26. #define ECPG_MISSING_INDICATOR -213
  27. #define ECPG_NO_ARRAY -214
  28. #define ECPG_DATA_NOT_ARRAY -215
  29. #define ECPG_ARRAY_INSERT -216
  30. #define ECPG_NO_CONN -220
  31. #define ECPG_NOT_CONN -221
  32. #define ECPG_INVALID_STMT -230
  33. /* dynamic SQL related */
  34. #define ECPG_UNKNOWN_DESCRIPTOR -240
  35. #define ECPG_INVALID_DESCRIPTOR_INDEX -241
  36. #define ECPG_UNKNOWN_DESCRIPTOR_ITEM -242
  37. #define ECPG_VAR_NOT_NUMERIC -243
  38. #define ECPG_VAR_NOT_CHAR -244
  39. /* finally the backend error messages, they start at 400 */
  40. #define ECPG_PGSQL -400
  41. #define ECPG_TRANS -401
  42. #define ECPG_CONNECT -402
  43. #define ECPG_DUPLICATE_KEY -403
  44. #define ECPG_SUBSELECT_NOT_ONE -404
  45. /* for compatibility we define some different error codes for the same error
  46. * if adding a new one make sure to not double define it */
  47. #define ECPG_INFORMIX_DUPLICATE_KEY -239
  48. #define ECPG_INFORMIX_SUBSELECT_NOT_ONE -284
  49. /* backend WARNINGs, starting at 600 */
  50. #define ECPG_WARNING_UNRECOGNIZED -600
  51. /* WARNING: (transaction aborted): queries ignored until END */
  52. /*
  53. * WARNING: current transaction is aborted, queries ignored until end of
  54. * transaction block
  55. */
  56. #define ECPG_WARNING_QUERY_IGNORED -601
  57. /* WARNING: PerformPortalClose: portal "*" not found */
  58. #define ECPG_WARNING_UNKNOWN_PORTAL -602
  59. /* WARNING: BEGIN: already a transaction in progress */
  60. #define ECPG_WARNING_IN_TRANSACTION -603
  61. /* WARNING: AbortTransaction and not in in-progress state */
  62. /* WARNING: COMMIT: no transaction in progress */
  63. #define ECPG_WARNING_NO_TRANSACTION -604
  64. /* WARNING: BlankPortalAssignName: portal * already exists */
  65. #define ECPG_WARNING_PORTAL_EXISTS -605
  66. #endif /* !_ECPG_ERRNO_H */