summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/libpq-int.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-06-23 19:20:25 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-06-23 19:20:25 +0000
commitab5c775116413b1b7fb09cd83bfcc242d8756601 (patch)
tree32eec15b275af2398caa1ee1a6d876c713e18252 /src/interfaces/libpq/libpq-int.h
parent408625321c8e6bf387f91c2112e30fd64d28a4b8 (diff)
Change pqInternalNotice to accept a format string and args instead of
just a preformatted message; per suggestion by Sean Chittenden.
Diffstat (limited to 'src/interfaces/libpq/libpq-int.h')
-rw-r--r--src/interfaces/libpq/libpq-int.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/interfaces/libpq/libpq-int.h b/src/interfaces/libpq/libpq-int.h
index f651320e1cb..d97db7c88b1 100644
--- a/src/interfaces/libpq/libpq-int.h
+++ b/src/interfaces/libpq/libpq-int.h
@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: libpq-int.h,v 1.75 2003/06/21 21:51:34 tgl Exp $
+ * $Id: libpq-int.h,v 1.76 2003/06/23 19:20:25 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -360,7 +360,9 @@ extern char *pqResultStrdup(PGresult *res, const char *str);
extern void pqClearAsyncResult(PGconn *conn);
extern void pqSaveErrorResult(PGconn *conn);
extern PGresult *pqPrepareAsyncResult(PGconn *conn);
-extern void pqInternalNotice(const PGNoticeHooks *hooks, const char *msgtext);
+extern void pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt, ...)
+/* This lets gcc check the format string for consistency. */
+__attribute__((format(printf, 2, 3)));
extern int pqAddTuple(PGresult *res, PGresAttValue *tup);
extern void pqSaveMessageField(PGresult *res, char code,
const char *value);
@@ -435,10 +437,6 @@ extern void pqsecure_close(PGconn *);
extern ssize_t pqsecure_read(PGconn *, void *ptr, size_t len);
extern ssize_t pqsecure_write(PGconn *, const void *ptr, size_t len);
-/* Note: PGDONOTICE macro will work if applied to either PGconn or PGresult */
-#define PGDONOTICE(conn,message) \
- pqInternalNotice(&(conn)->noticeHooks, (message))
-
/*
* this is so that we can check if a connection is non-blocking internally
* without the overhead of a function call