mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +03:00
Pgindent run before 9.1 beta2.
This commit is contained in:
@@ -228,8 +228,12 @@ ecpg_build_compat_sqlda(int line, PGresult *res, int row, enum COMPAT_MODE compa
|
||||
strcpy(fname, PQfname(res, i));
|
||||
sqlda->sqlvar[i].sqlname = fname;
|
||||
fname += strlen(sqlda->sqlvar[i].sqlname) + 1;
|
||||
/* this is reserved for future use, so we leave it empty for the time being */
|
||||
/* sqlda->sqlvar[i].sqlformat = (char *) (long) PQfformat(res, i);*/
|
||||
|
||||
/*
|
||||
* this is reserved for future use, so we leave it empty for the time
|
||||
* being
|
||||
*/
|
||||
/* sqlda->sqlvar[i].sqlformat = (char *) (long) PQfformat(res, i); */
|
||||
sqlda->sqlvar[i].sqlxid = PQftype(res, i);
|
||||
sqlda->sqlvar[i].sqltypelen = PQfsize(res, i);
|
||||
}
|
||||
|
||||
@@ -503,7 +503,7 @@ dttofmtasc_replace(timestamp * ts, date dDate, int dow, struct tm * tm,
|
||||
case 'G':
|
||||
{
|
||||
/* Keep compiler quiet - Don't use a literal format */
|
||||
const char *fmt = "%G";
|
||||
const char *fmt = "%G";
|
||||
|
||||
tm->tm_mon -= 1;
|
||||
i = strftime(q, *pstr_len, fmt, tm);
|
||||
@@ -689,7 +689,7 @@ dttofmtasc_replace(timestamp * ts, date dDate, int dow, struct tm * tm,
|
||||
case 'V':
|
||||
{
|
||||
/* Keep compiler quiet - Don't use a literal format */
|
||||
const char *fmt = "%V";
|
||||
const char *fmt = "%V";
|
||||
|
||||
i = strftime(q, *pstr_len, fmt, tm);
|
||||
if (i == 0)
|
||||
|
||||
@@ -325,7 +325,7 @@ pg_GSS_error_int(PQExpBuffer str, const char *mprefix,
|
||||
do
|
||||
{
|
||||
gss_display_status(&lmin_s, stat, type,
|
||||
GSS_C_NO_OID, &msg_ctx, &lmsg);
|
||||
GSS_C_NO_OID, &msg_ctx, &lmsg);
|
||||
appendPQExpBuffer(str, "%s: %s\n", mprefix, (char *) lmsg.value);
|
||||
gss_release_buffer(&lmin_s, &lmsg);
|
||||
} while (msg_ctx);
|
||||
@@ -693,9 +693,9 @@ pg_local_sendauth(PGconn *conn)
|
||||
struct cmsghdr *cmsg;
|
||||
union
|
||||
{
|
||||
struct cmsghdr hdr;
|
||||
unsigned char buf[CMSG_SPACE(sizeof(struct cmsgcred))];
|
||||
} cmsgbuf;
|
||||
struct cmsghdr hdr;
|
||||
unsigned char buf[CMSG_SPACE(sizeof(struct cmsgcred))];
|
||||
} cmsgbuf;
|
||||
|
||||
/*
|
||||
* The backend doesn't care what we send here, but it wants exactly one
|
||||
|
||||
@@ -1054,18 +1054,18 @@ connectFailureMessage(PGconn *conn, int errorno)
|
||||
if ((conn->pghostaddr == NULL) &&
|
||||
(conn->pghost == NULL || strcmp(conn->pghost, host_addr) != 0))
|
||||
appendPQExpBuffer(&conn->errorMessage,
|
||||
libpq_gettext("could not connect to server: %s\n"
|
||||
"\tIs the server running on host \"%s\" (%s) and accepting\n"
|
||||
"\tTCP/IP connections on port %s?\n"),
|
||||
libpq_gettext("could not connect to server: %s\n"
|
||||
"\tIs the server running on host \"%s\" (%s) and accepting\n"
|
||||
"\tTCP/IP connections on port %s?\n"),
|
||||
SOCK_STRERROR(errorno, sebuf, sizeof(sebuf)),
|
||||
displayed_host,
|
||||
host_addr,
|
||||
conn->pgport);
|
||||
else
|
||||
appendPQExpBuffer(&conn->errorMessage,
|
||||
libpq_gettext("could not connect to server: %s\n"
|
||||
"\tIs the server running on host \"%s\" and accepting\n"
|
||||
"\tTCP/IP connections on port %s?\n"),
|
||||
libpq_gettext("could not connect to server: %s\n"
|
||||
"\tIs the server running on host \"%s\" and accepting\n"
|
||||
"\tTCP/IP connections on port %s?\n"),
|
||||
SOCK_STRERROR(errorno, sebuf, sizeof(sebuf)),
|
||||
displayed_host,
|
||||
conn->pgport);
|
||||
@@ -1854,6 +1854,7 @@ keep_going: /* We will come back to here until there is
|
||||
int packetlen;
|
||||
|
||||
#ifdef HAVE_UNIX_SOCKETS
|
||||
|
||||
/*
|
||||
* Implement requirepeer check, if requested and it's a
|
||||
* Unix-domain socket.
|
||||
@@ -1870,14 +1871,17 @@ keep_going: /* We will come back to here until there is
|
||||
errno = 0;
|
||||
if (getpeereid(conn->sock, &uid, &gid) != 0)
|
||||
{
|
||||
/* Provide special error message if getpeereid is a stub */
|
||||
/*
|
||||
* Provide special error message if getpeereid is a
|
||||
* stub
|
||||
*/
|
||||
if (errno == ENOSYS)
|
||||
appendPQExpBuffer(&conn->errorMessage,
|
||||
libpq_gettext("requirepeer parameter is not supported on this platform\n"));
|
||||
else
|
||||
appendPQExpBuffer(&conn->errorMessage,
|
||||
libpq_gettext("could not get peer credentials: %s\n"),
|
||||
pqStrerror(errno, sebuf, sizeof(sebuf)));
|
||||
pqStrerror(errno, sebuf, sizeof(sebuf)));
|
||||
goto error_return;
|
||||
}
|
||||
|
||||
@@ -1899,7 +1903,7 @@ keep_going: /* We will come back to here until there is
|
||||
goto error_return;
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_UNIX_SOCKETS */
|
||||
#endif /* HAVE_UNIX_SOCKETS */
|
||||
|
||||
#ifdef USE_SSL
|
||||
|
||||
|
||||
Reference in New Issue
Block a user