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 16 #ifndef FAKEPQ_H_INCLUDED 17 #define FAKEPQ_H_INCLUDED 18 19 #ifndef MODULE_SCOPE 20 #define MODULE_SCOPE extern 21 #endif 22 23 MODULE_SCOPE Tcl_LoadHandle PostgresqlInitStubs(Tcl_Interp*); 24 25 typedef enum { 26 CONNECTION_OK=0, 27 } ConnStatusType; 28 typedef enum { 29 PGRES_EMPTY_QUERY=0, 30 PGRES_BAD_RESPONSE=5, 31 PGRES_NONFATAL_ERROR=6, 32 PGRES_FATAL_ERROR=7, 33 } ExecStatusType; 34 typedef unsigned int Oid; 35 typedef struct pg_conn PGconn; 36 typedef struct pg_result PGresult; 37 typedef void (*PQnoticeProcessor)(void*, const PGresult*); 38 39 #define PG_DIAG_SQLSTATE 'C' 40 #define PG_DIAG_MESSAGE_PRIMARY 'M' 41 42 #include "pqStubs.h" 43 44 MODULE_SCOPE const pqStubDefs* pqStubs; 45 46 #endif 47