]> granicus.if.org Git - postgresql/blobdiff - src/interfaces/libpq/libpq-fe.h
From: Dan McGuirk <mcguirk@indirect.com>
[postgresql] / src / interfaces / libpq / libpq-fe.h
index b781e580060428df10992d805d48f9ac7ce15cc8..c765661e71770e288dc48d70a9ad99c68b6d29de 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: libpq-fe.h,v 1.14 1996/12/04 03:06:33 bryanh Exp $
+ * $Id: libpq-fe.h,v 1.18 1997/03/12 21:23:16 scrappy Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -23,7 +23,7 @@ extern "C" {
  *     include stuff common to fe and be
  * ----------------
  */
-/* #include "libpq/libpq.h" */
+#include "postgres_ext.h"
 #include "libpq/pqcomm.h"
 #include "lib/dllist.h"
 
@@ -76,7 +76,7 @@ typedef struct {
 typedef struct pgresAttDesc {
   char* name; /* type name */
   Oid adtid;  /* type id */
-  int2 adtsize; /* type size */
+  short adtsize; /* type size */
 } PGresAttDesc;
 
 /* use char* for Attribute values,
@@ -125,6 +125,8 @@ typedef struct pg_conn{
   int asyncNotifyWaiting;
   Dllist* notifyList;
   char *pguser;  /* Postgres username of user who is connected */
+  char *pgpass;
+  char *pgauth;
   PGlobjfuncs *lobjfuncs; /* Backend function OID's for large object access */
 } PGconn;
 
@@ -144,13 +146,19 @@ typedef struct pg_result{
   PGconn* conn;
 } PGresult;
 
+typedef char pqbool;
+  /* We can't use the conventional "bool", because we are designed to be
+     included in a user's program, and user may already have that type
+     defined.  Pqbool, on the other hand, is unlikely to be used.
+     */
+
 struct _PQprintOpt {
-    bool header;         /* print output field headings and row count */
-    bool align;          /* fill align the fields */
-    bool standard;       /* old brain dead format */
-    bool html3;          /* output html tables */
-    bool expanded;       /* expand tables */
-    bool pager;          /* use pager for output if needed */
+    pqbool header;         /* print output field headings and row count */
+    pqbool align;          /* fill align the fields */
+    pqbool standard;       /* old brain dead format */
+    pqbool html3;          /* output html tables */
+    pqbool expanded;       /* expand tables */
+    pqbool pager;          /* use pager for output if needed */
     char *fieldSep;      /* field separator */
     char *tableOpt;     /* insert to HTML <table ...> */
     char *caption;       /* HTML <caption> */
@@ -214,7 +222,7 @@ extern int PQnfields(PGresult *res);
 extern char* PQfname(PGresult *res, int field_num);
 extern int PQfnumber(PGresult *res, const char* field_name);
 extern Oid PQftype(PGresult *res, int field_num);
-extern int2 PQfsize(PGresult *res, int field_num);
+extern short PQfsize(PGresult *res, int field_num);
 extern char* PQcmdStatus(PGresult *res);
 extern const char* PQoidStatus(PGresult *res);
 extern char* PQgetvalue(PGresult *res, int tup_num, int field_num);
@@ -267,7 +275,7 @@ extern int pqGetc(FILE* stream, FILE *debug);
 extern int pqGetInt(int* result, int bytes, FILE* stream, FILE *debug );
 /* put a n-byte integer into the stream */
 /* returns 0 if successful */
-extern int pqPutInt(int n, int bytes, FILE* stream, FILE *debug );
+extern int pqPutInt(const int n, int bytes, FILE* stream, FILE *debug );
 extern void pqFlush(FILE* stream, FILE* debug);
 
 /* === in fe-lobj.c === */