1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-19 13:42:17 +03:00

Closer code review for PQconnectionUsedPassword() patch: in particular,

not OK to include postgres_fe.h into libpq-fe.h, hence declare it as
returning int not bool.
This commit is contained in:
Tom Lane
2007-07-08 18:28:56 +00:00
parent 3f33d7bcb6
commit 5f7b1f8d9d
5 changed files with 47 additions and 41 deletions

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.137 2007/07/08 17:11:51 joe Exp $
* $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.138 2007/07/08 18:28:55 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -23,11 +23,10 @@ extern "C"
#include <stdio.h>
/*
* defines the backend's externally visible types,
* postgres_ext.h defines the backend's externally visible types,
* such as Oid.
*/
#include "postgres_ext.h"
#include "postgres_fe.h"
/* Application-visible enum types */
@@ -264,9 +263,9 @@ extern int PQserverVersion(const PGconn *conn);
extern char *PQerrorMessage(const PGconn *conn);
extern int PQsocket(const PGconn *conn);
extern int PQbackendPID(const PGconn *conn);
extern int PQconnectionUsedPassword(const PGconn *conn);
extern int PQclientEncoding(const PGconn *conn);
extern int PQsetClientEncoding(PGconn *conn, const char *encoding);
extern bool PQconnectionUsedPassword(const PGconn *conn);
/* Get the OpenSSL structure associated with a connection. Returns NULL for
* unencrypted connections or if any other TLS library is in use. */
@@ -426,7 +425,8 @@ extern void PQfreemem(void *ptr);
/* Exists for backward compatibility. bjm 2003-03-24 */
#define PQfreeNotify(ptr) PQfreemem(ptr)
/* Define the string so all uses are consistent. */
/* Error when no password was given. */
/* Note: depending on this is deprecated; use PQconnectionUsedPassword(). */
#define PQnoPasswordSupplied "fe_sendauth: no password supplied\n"
/*