Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
2637f887
Commit
2637f887
authored
Aug 17, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove some unneeded dashes from libpq comments.
parent
27c27291
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
78 additions
and
93 deletions
+78
-93
src/interfaces/libpq/fe-auth.c
src/interfaces/libpq/fe-auth.c
+4
-7
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/fe-connect.c
+10
-25
src/interfaces/libpq/fe-exec.c
src/interfaces/libpq/fe-exec.c
+3
-1
src/interfaces/libpq/fe-lobj.c
src/interfaces/libpq/fe-lobj.c
+2
-3
src/interfaces/libpq/fe-misc.c
src/interfaces/libpq/fe-misc.c
+49
-48
src/interfaces/libpq/pqexpbuffer.c
src/interfaces/libpq/pqexpbuffer.c
+10
-9
No files found.
src/interfaces/libpq/fe-auth.c
View file @
2637f887
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.5
3 2001/08/17 15:02:18
momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.5
4 2001/08/17 15:11:15
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -52,9 +52,8 @@
...
@@ -52,9 +52,8 @@
#endif
#endif
/*
----------------------------------------------------------------
/*
* common definitions for generic fe/be routines
* common definitions for generic fe/be routines
*----------------------------------------------------------------
*/
*/
struct
authsvc
struct
authsvc
...
@@ -98,9 +97,8 @@ static const struct authsvc authsvcs[] = {
...
@@ -98,9 +97,8 @@ static const struct authsvc authsvcs[] = {
static
const
int
n_authsvcs
=
sizeof
(
authsvcs
)
/
sizeof
(
struct
authsvc
);
static
const
int
n_authsvcs
=
sizeof
(
authsvcs
)
/
sizeof
(
struct
authsvc
);
#ifdef KRB4
#ifdef KRB4
/*
----------------------------------------------------------------
/*
* MIT Kerberos authentication system - protocol version 4
* MIT Kerberos authentication system - protocol version 4
*----------------------------------------------------------------
*/
*/
#include "krb.h"
#include "krb.h"
...
@@ -230,9 +228,8 @@ pg_krb4_sendauth(char *PQerrormsg, int sock,
...
@@ -230,9 +228,8 @@ pg_krb4_sendauth(char *PQerrormsg, int sock,
#endif
/* KRB4 */
#endif
/* KRB4 */
#ifdef KRB5
#ifdef KRB5
/*
----------------------------------------------------------------
/*
* MIT Kerberos authentication system - protocol version 5
* MIT Kerberos authentication system - protocol version 5
*----------------------------------------------------------------
*/
*/
#include <krb5.h>
#include <krb5.h>
...
...
src/interfaces/libpq/fe-connect.c
View file @
2637f887
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.17
4 2001/08/17 02:59:20
momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.17
5 2001/08/17 15:11:15
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -191,7 +191,7 @@ static int parseServiceInfo(PQconninfoOption *options,
...
@@ -191,7 +191,7 @@ static int parseServiceInfo(PQconninfoOption *options,
PQExpBuffer
errorMessage
);
PQExpBuffer
errorMessage
);
/*
----------------
/*
* Connecting to a Database
* Connecting to a Database
*
*
* There are now four different ways a user of this API can connect to the
* There are now four different ways a user of this API can connect to the
...
@@ -208,11 +208,9 @@ static int parseServiceInfo(PQconninfoOption *options,
...
@@ -208,11 +208,9 @@ static int parseServiceInfo(PQconninfoOption *options,
*
*
* Internally, the static functions connectDBStart, connectDBComplete
* Internally, the static functions connectDBStart, connectDBComplete
* are part of the connection procedure.
* are part of the connection procedure.
*
* ----------------
*/
*/
/*
----------------
/*
* PQconnectdb
* PQconnectdb
*
*
* establishes a connection to a postgres backend through the postmaster
* establishes a connection to a postgres backend through the postmaster
...
@@ -233,8 +231,6 @@ static int parseServiceInfo(PQconninfoOption *options,
...
@@ -233,8 +231,6 @@ static int parseServiceInfo(PQconninfoOption *options,
*
*
* You should call PQfinish (if conn is not NULL) regardless of whether this
* You should call PQfinish (if conn is not NULL) regardless of whether this
* call succeeded.
* call succeeded.
*
* ----------------
*/
*/
PGconn
*
PGconn
*
PQconnectdb
(
const
char
*
conninfo
)
PQconnectdb
(
const
char
*
conninfo
)
...
@@ -247,7 +243,7 @@ PQconnectdb(const char *conninfo)
...
@@ -247,7 +243,7 @@ PQconnectdb(const char *conninfo)
return
conn
;
return
conn
;
}
}
/*
----------------
/*
* PQconnectStart
* PQconnectStart
*
*
* Begins the establishment of a connection to a postgres backend through the
* Begins the establishment of a connection to a postgres backend through the
...
@@ -265,8 +261,6 @@ PQconnectdb(const char *conninfo)
...
@@ -265,8 +261,6 @@ PQconnectdb(const char *conninfo)
* this is necessary.
* this is necessary.
*
*
* See PQconnectPoll for more info.
* See PQconnectPoll for more info.
*
* ----------------
*/
*/
PGconn
*
PGconn
*
PQconnectStart
(
const
char
*
conninfo
)
PQconnectStart
(
const
char
*
conninfo
)
...
@@ -346,7 +340,7 @@ PQconnectStart(const char *conninfo)
...
@@ -346,7 +340,7 @@ PQconnectStart(const char *conninfo)
return
conn
;
return
conn
;
}
}
/*
----------------
/*
* PQconndefaults
* PQconndefaults
*
*
* Parse an empty string like PQconnectdb() would do and return the
* Parse an empty string like PQconnectdb() would do and return the
...
@@ -360,7 +354,6 @@ PQconnectStart(const char *conninfo)
...
@@ -360,7 +354,6 @@ PQconnectStart(const char *conninfo)
* versions, the returned array was static, but that's not thread-safe.)
* versions, the returned array was static, but that's not thread-safe.)
* Pre-7.0 applications that use this function will see a small memory leak
* Pre-7.0 applications that use this function will see a small memory leak
* until they are updated to call PQconninfoFree.
* until they are updated to call PQconninfoFree.
* ----------------
*/
*/
PQconninfoOption
*
PQconninfoOption
*
PQconndefaults
(
void
)
PQconndefaults
(
void
)
...
@@ -411,7 +404,6 @@ PQconndefaults(void)
...
@@ -411,7 +404,6 @@ PQconndefaults(void)
* the database name to lower case if it is not surrounded by double quotes.
* the database name to lower case if it is not surrounded by double quotes.
* Otherwise, strip the double quotes but leave the reset of the string intact.
* Otherwise, strip the double quotes but leave the reset of the string intact.
* - thomas 1997-11-08
* - thomas 1997-11-08
*
* ----------------
* ----------------
*/
*/
PGconn
*
PGconn
*
...
@@ -1044,13 +1036,12 @@ connect_errReturn:
...
@@ -1044,13 +1036,12 @@ connect_errReturn:
}
}
/*
----------------
/*
* connectDBComplete
* connectDBComplete
*
*
* Block and complete a connection.
* Block and complete a connection.
*
*
* Returns 1 on success, 0 on failure.
* Returns 1 on success, 0 on failure.
* ----------------
*/
*/
static
int
static
int
connectDBComplete
(
PGconn
*
conn
)
connectDBComplete
(
PGconn
*
conn
)
...
@@ -1520,13 +1511,11 @@ error_return:
...
@@ -1520,13 +1511,11 @@ error_return:
}
}
/*
----------------
/*
* PQsetenvStart
* PQsetenvStart
*
*
* Starts the process of passing the values of a standard set of environment
* Starts the process of passing the values of a standard set of environment
* variables to the backend.
* variables to the backend.
*
* ----------------
*/
*/
static
bool
static
bool
PQsetenvStart
(
PGconn
*
conn
)
PQsetenvStart
(
PGconn
*
conn
)
...
@@ -1547,13 +1536,11 @@ PQsetenvStart(PGconn *conn)
...
@@ -1547,13 +1536,11 @@ PQsetenvStart(PGconn *conn)
return
true
;
return
true
;
}
}
/*
----------------
/*
* PQsetenvPoll
* PQsetenvPoll
*
*
* Polls the process of passing the values of a standard set of environment
* Polls the process of passing the values of a standard set of environment
* variables to the backend.
* variables to the backend.
*
* ----------------
*/
*/
static
PostgresPollingStatusType
static
PostgresPollingStatusType
PQsetenvPoll
(
PGconn
*
conn
)
PQsetenvPoll
(
PGconn
*
conn
)
...
@@ -1784,7 +1771,7 @@ error_return:
...
@@ -1784,7 +1771,7 @@ error_return:
#ifdef NOT_USED
#ifdef NOT_USED
/*
----------------
/*
* PQsetenv
* PQsetenv
*
*
* Passes the values of a standard set of environment variables to the
* Passes the values of a standard set of environment variables to the
...
@@ -1795,7 +1782,6 @@ error_return:
...
@@ -1795,7 +1782,6 @@ error_return:
* This function used to be exported for no particularly good reason.
* This function used to be exported for no particularly good reason.
* Since it's no longer used by libpq itself, let's try #ifdef'ing it out
* Since it's no longer used by libpq itself, let's try #ifdef'ing it out
* and see if anyone complains.
* and see if anyone complains.
* ----------------
*/
*/
static
bool
static
bool
PQsetenv
(
PGconn
*
conn
)
PQsetenv
(
PGconn
*
conn
)
...
@@ -2365,13 +2351,12 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
...
@@ -2365,13 +2351,12 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
}
}
/*
----------------
/*
* Conninfo parser routine
* Conninfo parser routine
*
*
* If successful, a malloc'd PQconninfoOption array is returned.
* If successful, a malloc'd PQconninfoOption array is returned.
* If not successful, NULL is returned and an error message is
* If not successful, NULL is returned and an error message is
* left in errorMessage.
* left in errorMessage.
* ----------------
*/
*/
static
PQconninfoOption
*
static
PQconninfoOption
*
conninfo_parse
(
const
char
*
conninfo
,
PQExpBuffer
errorMessage
)
conninfo_parse
(
const
char
*
conninfo
,
PQExpBuffer
errorMessage
)
...
...
src/interfaces/libpq/fe-exec.c
View file @
2637f887
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.10
6 2001/08/15 18:42
:15 momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.10
7 2001/08/17 15:11
:15 momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -73,6 +73,7 @@ static int getNotice(PGconn *conn);
...
@@ -73,6 +73,7 @@ static int getNotice(PGconn *conn);
* combine it with the first allocation block, but that would waste space
* combine it with the first allocation block, but that would waste space
* for the common case that no extra storage is actually needed (that is,
* for the common case that no extra storage is actually needed (that is,
* the SQL command did not return tuples).
* the SQL command did not return tuples).
*
* We also malloc the top-level array of tuple pointers separately, because
* We also malloc the top-level array of tuple pointers separately, because
* we need to be able to enlarge it via realloc, and our trivial space
* we need to be able to enlarge it via realloc, and our trivial space
* allocator doesn't handle that effectively. (Too bad the FE/BE protocol
* allocator doesn't handle that effectively. (Too bad the FE/BE protocol
...
@@ -84,6 +85,7 @@ static int getNotice(PGconn *conn);
...
@@ -84,6 +85,7 @@ static int getNotice(PGconn *conn);
* A query returning a small amount of data will thus require three malloc
* A query returning a small amount of data will thus require three malloc
* calls: one for the PGresult, one for the tuples pointer array, and one
* calls: one for the PGresult, one for the tuples pointer array, and one
* PGresult_data block.
* PGresult_data block.
*
* Only the most recently allocated PGresult_data block is a candidate to
* Only the most recently allocated PGresult_data block is a candidate to
* have more stuff added to it --- any extra space left over in older blocks
* have more stuff added to it --- any extra space left over in older blocks
* is wasted. We could be smarter and search the whole chain, but the point
* is wasted. We could be smarter and search the whole chain, but the point
...
...
src/interfaces/libpq/fe-lobj.c
View file @
2637f887
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-lobj.c,v 1.3
6 2001/08/03 22:11:39 tgl
Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-lobj.c,v 1.3
7 2001/08/17 15:11:15 momjian
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -507,13 +507,12 @@ lo_export(PGconn *conn, Oid lobjId, const char *filename)
...
@@ -507,13 +507,12 @@ lo_export(PGconn *conn, Oid lobjId, const char *filename)
}
}
/*
----------------
/*
* lo_initialize
* lo_initialize
*
*
* Initialize the large object interface for an existing connection.
* Initialize the large object interface for an existing connection.
* We ask the backend about the functions OID's in pg_proc for all
* We ask the backend about the functions OID's in pg_proc for all
* functions that are required for large object operations.
* functions that are required for large object operations.
* ----------------
*/
*/
static
int
static
int
lo_initialize
(
PGconn
*
conn
)
lo_initialize
(
PGconn
*
conn
)
...
...
src/interfaces/libpq/fe-misc.c
View file @
2637f887
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.5
2 2001/07/20 17:45:06
momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.5
3 2001/08/17 15:11:15
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -62,14 +62,14 @@
...
@@ -62,14 +62,14 @@
static
int
pqPutBytes
(
const
char
*
s
,
size_t
nbytes
,
PGconn
*
conn
);
static
int
pqPutBytes
(
const
char
*
s
,
size_t
nbytes
,
PGconn
*
conn
);
/*
--------------------------------------------------------------------- */
/*
/
* pqGetc:
* pqGetc:
get a character from the connection
*
get a character from the connection
*
All these routines return 0 on success, EOF on error.
*
All these routines return 0 on success, EOF on error.
Note that for the Get routines, EOF only means there is not enough
*
Note that for the Get routines, EOF only means there is not enough
data in the buffer, not that there is necessarily a hard error.
*
data in the buffer, not that there is necessarily a hard error.
*/
*/
int
int
pqGetc
(
char
*
result
,
PGconn
*
conn
)
pqGetc
(
char
*
result
,
PGconn
*
conn
)
{
{
...
@@ -101,9 +101,9 @@ pqPutc(char c, PGconn *conn)
...
@@ -101,9 +101,9 @@ pqPutc(char c, PGconn *conn)
}
}
/*
--------------------------------------------------------------------- */
/*
/
* pqPutBytes: local routine to write N bytes to the connection,
* pqPutBytes: local routine to write N bytes to the connection,
with buffering
*
with buffering
*/
*/
static
int
static
int
pqPutBytes
(
const
char
*
s
,
size_t
nbytes
,
PGconn
*
conn
)
pqPutBytes
(
const
char
*
s
,
size_t
nbytes
,
PGconn
*
conn
)
...
@@ -160,13 +160,13 @@ pqPutBytes(const char *s, size_t nbytes, PGconn *conn)
...
@@ -160,13 +160,13 @@ pqPutBytes(const char *s, size_t nbytes, PGconn *conn)
return
0
;
return
0
;
}
}
/*
--------------------------------------------------------------------- */
/*
/
* pqGets:
* pqGets:
get a null-terminated string from the connection,
*
get a null-terminated string from the connection,
and store it in an expansible PQExpBuffer.
*
and store it in an expansible PQExpBuffer.
If we run out of memory, all of the string is still read,
*
If we run out of memory, all of the string is still read,
but the excess characters are silently discarded.
*
but the excess characters are silently discarded.
*/
*/
int
int
pqGets
(
PQExpBuffer
buf
,
PGconn
*
conn
)
pqGets
(
PQExpBuffer
buf
,
PGconn
*
conn
)
{
{
...
@@ -196,7 +196,7 @@ pqGets(PQExpBuffer buf, PGconn *conn)
...
@@ -196,7 +196,7 @@ pqGets(PQExpBuffer buf, PGconn *conn)
return
0
;
return
0
;
}
}
/* --------------------------------------------------------------------- */
int
int
pqPuts
(
const
char
*
s
,
PGconn
*
conn
)
pqPuts
(
const
char
*
s
,
PGconn
*
conn
)
{
{
...
@@ -209,10 +209,10 @@ pqPuts(const char *s, PGconn *conn)
...
@@ -209,10 +209,10 @@ pqPuts(const char *s, PGconn *conn)
return
0
;
return
0
;
}
}
/*
--------------------------------------------------------------------- */
/*
/
* pqGetnchar:
* pqGetnchar:
get a string of exactly len bytes in buffer s, no null termination
*
get a string of exactly len bytes in buffer s, no null termination
*/
*/
int
int
pqGetnchar
(
char
*
s
,
size_t
len
,
PGconn
*
conn
)
pqGetnchar
(
char
*
s
,
size_t
len
,
PGconn
*
conn
)
{
{
...
@@ -230,10 +230,10 @@ pqGetnchar(char *s, size_t len, PGconn *conn)
...
@@ -230,10 +230,10 @@ pqGetnchar(char *s, size_t len, PGconn *conn)
return
0
;
return
0
;
}
}
/*
--------------------------------------------------------------------- */
/*
/
* pqPutnchar:
* pqPutnchar:
send a string of exactly len bytes, no null termination needed
*
send a string of exactly len bytes, no null termination needed
*/
*/
int
int
pqPutnchar
(
const
char
*
s
,
size_t
len
,
PGconn
*
conn
)
pqPutnchar
(
const
char
*
s
,
size_t
len
,
PGconn
*
conn
)
{
{
...
@@ -246,11 +246,11 @@ pqPutnchar(const char *s, size_t len, PGconn *conn)
...
@@ -246,11 +246,11 @@ pqPutnchar(const char *s, size_t len, PGconn *conn)
return
0
;
return
0
;
}
}
/*
--------------------------------------------------------------------- */
/*
/
* pgGetInt
* pgGetInt
read a 2 or 4 byte integer and convert from network byte order
*
read a 2 or 4 byte integer and convert from network byte order
to local byte order
*
to local byte order
*/
*/
int
int
pqGetInt
(
int
*
result
,
size_t
bytes
,
PGconn
*
conn
)
pqGetInt
(
int
*
result
,
size_t
bytes
,
PGconn
*
conn
)
{
{
...
@@ -288,11 +288,11 @@ pqGetInt(int *result, size_t bytes, PGconn *conn)
...
@@ -288,11 +288,11 @@ pqGetInt(int *result, size_t bytes, PGconn *conn)
return
0
;
return
0
;
}
}
/*
--------------------------------------------------------------------- */
/*
/
* pgPutInt
* pgPutInt
send an integer of 2 or 4 bytes, converting from host byte order
*
send an integer of 2 or 4 bytes, converting from host byte order
to network byte order.
*
to network byte order.
*/
*/
int
int
pqPutInt
(
int
value
,
size_t
bytes
,
PGconn
*
conn
)
pqPutInt
(
int
value
,
size_t
bytes
,
PGconn
*
conn
)
{
{
...
@@ -326,8 +326,8 @@ pqPutInt(int value, size_t bytes, PGconn *conn)
...
@@ -326,8 +326,8 @@ pqPutInt(int value, size_t bytes, PGconn *conn)
return
0
;
return
0
;
}
}
/*
--------------------------------------------------------------------- */
/*
/
* pqReadReady: is select() saying the file is ready to read?
* pqReadReady: is select() saying the file is ready to read?
* Returns -1 on failure, 0 if not ready, 1 if ready.
* Returns -1 on failure, 0 if not ready, 1 if ready.
*/
*/
int
int
...
@@ -360,8 +360,8 @@ retry:
...
@@ -360,8 +360,8 @@ retry:
return
FD_ISSET
(
conn
->
sock
,
&
input_mask
)
?
1
:
0
;
return
FD_ISSET
(
conn
->
sock
,
&
input_mask
)
?
1
:
0
;
}
}
/*
--------------------------------------------------------------------- */
/*
/
* pqWriteReady: is select() saying the file is ready to write?
* pqWriteReady: is select() saying the file is ready to write?
* Returns -1 on failure, 0 if not ready, 1 if ready.
* Returns -1 on failure, 0 if not ready, 1 if ready.
*/
*/
int
int
...
@@ -393,8 +393,8 @@ retry:
...
@@ -393,8 +393,8 @@ retry:
return
FD_ISSET
(
conn
->
sock
,
&
input_mask
)
?
1
:
0
;
return
FD_ISSET
(
conn
->
sock
,
&
input_mask
)
?
1
:
0
;
}
}
/* ----------
----------------------------------------------------------- */
/* ----------
/
* pqReadData: read more data, if any is available
* pqReadData: read more data, if any is available
* Possible return values:
* Possible return values:
* 1: successfully loaded at least one more byte
* 1: successfully loaded at least one more byte
* 0: no data is presently available, but no error detected
* 0: no data is presently available, but no error detected
...
@@ -402,6 +402,7 @@ retry:
...
@@ -402,6 +402,7 @@ retry:
* conn->errorMessage set
* conn->errorMessage set
* NOTE: callers must not assume that pointers or indexes into conn->inBuffer
* NOTE: callers must not assume that pointers or indexes into conn->inBuffer
* remain valid across this call!
* remain valid across this call!
* ----------
*/
*/
int
int
pqReadData
(
PGconn
*
conn
)
pqReadData
(
PGconn
*
conn
)
...
@@ -600,8 +601,8 @@ definitelyFailed:
...
@@ -600,8 +601,8 @@ definitelyFailed:
return
-
1
;
return
-
1
;
}
}
/*
--------------------------------------------------------------------- */
/*
/
* pqFlush: send any data waiting in the output buffer
* pqFlush: send any data waiting in the output buffer
*/
*/
int
int
pqFlush
(
PGconn
*
conn
)
pqFlush
(
PGconn
*
conn
)
...
@@ -736,8 +737,8 @@ pqFlush(PGconn *conn)
...
@@ -736,8 +737,8 @@ pqFlush(PGconn *conn)
return
0
;
return
0
;
}
}
/*
--------------------------------------------------------------------- */
/*
/
* pqWait: wait until we can read or write the connection socket
* pqWait: wait until we can read or write the connection socket
*
*
* We also stop waiting and return if the kernel flags an exception condition
* We also stop waiting and return if the kernel flags an exception condition
* on the socket. The actual error condition will be detected and reported
* on the socket. The actual error condition will be detected and reported
...
...
src/interfaces/libpq/pqexpbuffer.c
View file @
2637f887
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $Header: /cvsroot/pgsql/src/interfaces/libpq/pqexpbuffer.c,v 1.1
0 2001/03/22 06:16:20
momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/pqexpbuffer.c,v 1.1
1 2001/08/17 15:11:15
momjian Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -70,8 +70,9 @@ initPQExpBuffer(PQExpBuffer str)
...
@@ -70,8 +70,9 @@ initPQExpBuffer(PQExpBuffer str)
}
}
}
}
/*
------------------------
/*
* destroyPQExpBuffer(str);
* destroyPQExpBuffer(str);
*
* free()s both the data buffer and the PQExpBufferData.
* free()s both the data buffer and the PQExpBufferData.
* This is the inverse of createPQExpBuffer().
* This is the inverse of createPQExpBuffer().
*/
*/
...
@@ -85,7 +86,7 @@ destroyPQExpBuffer(PQExpBuffer str)
...
@@ -85,7 +86,7 @@ destroyPQExpBuffer(PQExpBuffer str)
}
}
}
}
/*
------------------------
/*
* termPQExpBuffer(str)
* termPQExpBuffer(str)
* free()s the data buffer but not the PQExpBufferData itself.
* free()s the data buffer but not the PQExpBufferData itself.
* This is the inverse of initPQExpBuffer().
* This is the inverse of initPQExpBuffer().
...
@@ -103,7 +104,7 @@ termPQExpBuffer(PQExpBuffer str)
...
@@ -103,7 +104,7 @@ termPQExpBuffer(PQExpBuffer str)
str
->
len
=
0
;
str
->
len
=
0
;
}
}
/*
------------------------
/*
* resetPQExpBuffer
* resetPQExpBuffer
* Reset a PQExpBuffer to empty
* Reset a PQExpBuffer to empty
*/
*/
...
@@ -118,7 +119,7 @@ resetPQExpBuffer(PQExpBuffer str)
...
@@ -118,7 +119,7 @@ resetPQExpBuffer(PQExpBuffer str)
}
}
}
}
/*
------------------------
/*
* enlargePQExpBuffer
* enlargePQExpBuffer
* Make sure there is enough space for 'needed' more bytes in the buffer
* Make sure there is enough space for 'needed' more bytes in the buffer
* ('needed' does not include the terminating null).
* ('needed' does not include the terminating null).
...
@@ -155,7 +156,7 @@ enlargePQExpBuffer(PQExpBuffer str, size_t needed)
...
@@ -155,7 +156,7 @@ enlargePQExpBuffer(PQExpBuffer str, size_t needed)
return
0
;
return
0
;
}
}
/*
------------------------
/*
* printfPQExpBuffer
* printfPQExpBuffer
* Format text data under the control of fmt (an sprintf-like format string)
* Format text data under the control of fmt (an sprintf-like format string)
* and insert it into str. More space is allocated to str if necessary.
* and insert it into str. More space is allocated to str if necessary.
...
@@ -205,7 +206,7 @@ printfPQExpBuffer(PQExpBuffer str, const char *fmt,...)
...
@@ -205,7 +206,7 @@ printfPQExpBuffer(PQExpBuffer str, const char *fmt,...)
}
}
}
}
/*
------------------------
/*
* appendPQExpBuffer
* appendPQExpBuffer
*
*
* Format text data under the control of fmt (an sprintf-like format string)
* Format text data under the control of fmt (an sprintf-like format string)
...
@@ -254,7 +255,7 @@ appendPQExpBuffer(PQExpBuffer str, const char *fmt,...)
...
@@ -254,7 +255,7 @@ appendPQExpBuffer(PQExpBuffer str, const char *fmt,...)
}
}
}
}
/*
------------------------
/*
* appendPQExpBufferStr
* appendPQExpBufferStr
* Append the given string to a PQExpBuffer, allocating more space
* Append the given string to a PQExpBuffer, allocating more space
* if necessary.
* if necessary.
...
@@ -265,7 +266,7 @@ appendPQExpBufferStr(PQExpBuffer str, const char *data)
...
@@ -265,7 +266,7 @@ appendPQExpBufferStr(PQExpBuffer str, const char *data)
appendBinaryPQExpBuffer
(
str
,
data
,
strlen
(
data
));
appendBinaryPQExpBuffer
(
str
,
data
,
strlen
(
data
));
}
}
/*
------------------------
/*
* appendPQExpBufferChar
* appendPQExpBufferChar
* Append a single byte to str.
* Append a single byte to str.
* Like appendPQExpBuffer(str, "%c", ch) but much faster.
* Like appendPQExpBuffer(str, "%c", ch) but much faster.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment