Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcf9ecbd

Browse files
committed
Just a couple of "after-commit" cleanups...
1 parent9312033 commitcf9ecbd

File tree

2 files changed

+97
-28
lines changed

2 files changed

+97
-28
lines changed

‎src/interfaces/libpq/fe-connect.h

Lines changed: 0 additions & 28 deletions
This file was deleted.

‎src/interfaces/libpq/libpq-int.h

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* libpq-int.h--
4+
* This file contains internal definitions meant to be used only by
5+
* the frontend libpq library, not by applications that call it.
6+
*
7+
* Copyright (c) 1994, Regents of the University of California
8+
*
9+
* $Id: libpq-int.h,v 1.1 1998/08/17 03:52:36 scrappy Exp $
10+
*
11+
*-------------------------------------------------------------------------
12+
*/
13+
14+
#ifndefLIBPQ_INT_H
15+
#defineLIBPQ_INT_H
16+
17+
/* We assume libpq-fe.h has already been included. */
18+
19+
/* ----------------
20+
*include stuff common to fe and be
21+
* ----------------
22+
*/
23+
#include"libpq/pqcomm.h"
24+
25+
/* libpq supports this version of the frontend/backend protocol.
26+
*
27+
* NB: we used to use PG_PROTOCOL_LATEST from the backend pqcomm.h file,
28+
* but that's not really the right thing: just recompiling libpq
29+
* against a more recent backend isn't going to magically update it
30+
* for most sorts of protocol changes. So, when you change libpq
31+
* to support a different protocol revision, you have to change this
32+
* constant too. PG_PROTOCOL_EARLIEST and PG_PROTOCOL_LATEST in
33+
* pqcomm.h describe what the backend knows, not what libpq knows.
34+
*/
35+
36+
#definePG_PROTOCOL_LIBPQPG_PROTOCOL(2,0)
37+
38+
/* ----------------
39+
* Internal functions of libpq
40+
* Functions declared here need to be visible across files of libpq,
41+
* but are not intended to be called by applications. We use the
42+
* convention "pqXXX" for internal functions, vs. the "PQxxx" names
43+
* used for application-visible routines.
44+
* ----------------
45+
*/
46+
47+
/* === in fe-connect.c === */
48+
49+
externintpqPacketSend(PGconn*conn,constchar*buf,size_tlen);
50+
51+
/* === in fe-exec.c === */
52+
53+
externvoidpqClearAsyncResult(PGconn*conn);
54+
55+
/* === in fe-misc.c === */
56+
57+
/* "Get" and "Put" routines return 0 if successful, EOF if not.
58+
* Note that for Get, EOF merely means the buffer is exhausted,
59+
* not that there is necessarily any error.
60+
*/
61+
externintpqGetc(char*result,PGconn*conn);
62+
externintpqGets(char*s,intmaxlen,PGconn*conn);
63+
externintpqPuts(constchar*s,PGconn*conn);
64+
externintpqGetnchar(char*s,intlen,PGconn*conn);
65+
externintpqPutnchar(constchar*s,intlen,PGconn*conn);
66+
externintpqGetInt(int*result,intbytes,PGconn*conn);
67+
externintpqPutInt(intvalue,intbytes,PGconn*conn);
68+
externintpqReadData(PGconn*conn);
69+
externintpqFlush(PGconn*conn);
70+
externintpqWait(intforRead,intforWrite,PGconn*conn);
71+
72+
/* max length of message to send */
73+
#defineMAX_MESSAGE_LEN 8193
74+
75+
/* maximum number of fields in a tuple */
76+
#defineMAX_FIELDS 512
77+
78+
/* bits in a byte */
79+
#defineBYTELEN 8
80+
81+
/* fall back options if they are not specified by arguments or defined
82+
by environment variables */
83+
#defineDefaultHost"localhost"
84+
#defineDefaultTty""
85+
#defineDefaultOption""
86+
#defineDefaultAuthtype ""
87+
#defineDefaultPassword ""
88+
89+
/* supply an implementation of strerror() macro if system doesn't have it */
90+
#ifndefstrerror
91+
#if defined(sun)&& defined(sparc)&& !defined(__SVR4)
92+
externchar*sys_errlist[];
93+
#definestrerror(A) (sys_errlist[(A)])
94+
#endif/* sunos4 */
95+
#endif/* !strerror */
96+
97+
#endif/* LIBPQ_INT_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp