fakepq.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * fakepq.h --
  3. *
  4. * Minimal replacement for 'pq-fe.h' in the PostgreSQL client
  5. * without having a PostgreSQL installation on the build system.
  6. * This file comprises only data type, constant and function definitions.
  7. *
  8. * The programmers of this file believe that it contains material not
  9. * subject to copyright under the doctrines of scenes a faire and
  10. * of merger of idea and expression. Accordingly, this file is in the
  11. * public domain.
  12. *
  13. *-----------------------------------------------------------------------------
  14. */
  15. #ifndef FAKEPQ_H_INCLUDED
  16. #define FAKEPQ_H_INCLUDED
  17. #ifndef MODULE_SCOPE
  18. #define MODULE_SCOPE extern
  19. #endif
  20. MODULE_SCOPE Tcl_LoadHandle PostgresqlInitStubs(Tcl_Interp*);
  21. typedef enum {
  22. CONNECTION_OK=0,
  23. } ConnStatusType;
  24. typedef enum {
  25. PGRES_EMPTY_QUERY=0,
  26. PGRES_BAD_RESPONSE=5,
  27. PGRES_NONFATAL_ERROR=6,
  28. PGRES_FATAL_ERROR=7,
  29. } ExecStatusType;
  30. typedef unsigned int Oid;
  31. typedef struct pg_conn PGconn;
  32. typedef struct pg_result PGresult;
  33. typedef void (*PQnoticeProcessor)(void*, const PGresult*);
  34. #define PG_DIAG_SQLSTATE 'C'
  35. #define PG_DIAG_MESSAGE_PRIMARY 'M'
  36. #include "pqStubs.h"
  37. MODULE_SCOPE const pqStubDefs* pqStubs;
  38. #endif