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
Hide 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 @@
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
*
* 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 @@
#endif
/*
----------------------------------------------------------------
/*
* common definitions for generic fe/be routines
*----------------------------------------------------------------
*/
struct
authsvc
...
...
@@ -98,9 +97,8 @@ static const struct authsvc authsvcs[] = {
static
const
int
n_authsvcs
=
sizeof
(
authsvcs
)
/
sizeof
(
struct
authsvc
);
#ifdef KRB4
/*
----------------------------------------------------------------
/*
* MIT Kerberos authentication system - protocol version 4
*----------------------------------------------------------------
*/
#include "krb.h"
...
...
@@ -230,9 +228,8 @@ pg_krb4_sendauth(char *PQerrormsg, int sock,
#endif
/* KRB4 */
#ifdef KRB5
/*
----------------------------------------------------------------
/*
* MIT Kerberos authentication system - protocol version 5
*----------------------------------------------------------------
*/
#include <krb5.h>
...
...
src/interfaces/libpq/fe-connect.c
View file @
2637f887
...
...
@@ -8,7 +8,7 @@
*
*
* 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,
PQExpBuffer
errorMessage
);
/*
----------------
/*
* Connecting to a Database
*
* There are now four different ways a user of this API can connect to the
...
...
@@ -208,11 +208,9 @@ static int parseServiceInfo(PQconninfoOption *options,
*
* Internally, the static functions connectDBStart, connectDBComplete
* are part of the connection procedure.
*
* ----------------
*/
/*
----------------
/*
* PQconnectdb
*
* establishes a connection to a postgres backend through the postmaster
...
...
@@ -233,8 +231,6 @@ static int parseServiceInfo(PQconninfoOption *options,
*
* You should call PQfinish (if conn is not NULL) regardless of whether this
* call succeeded.
*
* ----------------
*/
PGconn
*
PQconnectdb
(
const
char
*
conninfo
)
...
...
@@ -247,7 +243,7 @@ PQconnectdb(const char *conninfo)
return
conn
;
}
/*
----------------
/*
* PQconnectStart
*
* Begins the establishment of a connection to a postgres backend through the
...
...
@@ -265,8 +261,6 @@ PQconnectdb(const char *conninfo)
* this is necessary.
*
* See PQconnectPoll for more info.
*
* ----------------
*/
PGconn
*
PQconnectStart
(
const
char
*
conninfo
)
...
...
@@ -346,7 +340,7 @@ PQconnectStart(const char *conninfo)
return
conn
;
}
/*
----------------
/*
* PQconndefaults
*
* Parse an empty string like PQconnectdb() would do and return the
...
...
@@ -360,7 +354,6 @@ PQconnectStart(const char *conninfo)
* 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
* until they are updated to call PQconninfoFree.
* ----------------
*/
PQconninfoOption
*
PQconndefaults
(
void
)
...
...
@@ -411,7 +404,6 @@ PQconndefaults(void)
* 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.
* - thomas 1997-11-08
*
* ----------------
*/
PGconn
*
...
...
@@ -1044,13 +1036,12 @@ connect_errReturn:
}
/*
----------------
/*
* connectDBComplete
*
* Block and complete a connection.
*
* Returns 1 on success, 0 on failure.
* ----------------
*/
static
int
connectDBComplete
(
PGconn
*
conn
)
...
...
@@ -1520,13 +1511,11 @@ error_return:
}
/*
----------------
/*
* PQsetenvStart
*
* Starts the process of passing the values of a standard set of environment
* variables to the backend.
*
* ----------------
*/
static
bool
PQsetenvStart
(
PGconn
*
conn
)
...
...
@@ -1547,13 +1536,11 @@ PQsetenvStart(PGconn *conn)
return
true
;
}
/*
----------------
/*
* PQsetenvPoll
*
* Polls the process of passing the values of a standard set of environment
* variables to the backend.
*
* ----------------
*/
static
PostgresPollingStatusType
PQsetenvPoll
(
PGconn
*
conn
)
...
...
@@ -1784,7 +1771,7 @@ error_return:
#ifdef NOT_USED
/*
----------------
/*
* PQsetenv
*
* Passes the values of a standard set of environment variables to the
...
...
@@ -1795,7 +1782,6 @@ error_return:
* 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
* and see if anyone complains.
* ----------------
*/
static
bool
PQsetenv
(
PGconn
*
conn
)
...
...
@@ -2365,13 +2351,12 @@ parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
}
/*
----------------
/*
* Conninfo parser routine
*
* If successful, a malloc'd PQconninfoOption array is returned.
* If not successful, NULL is returned and an error message is
* left in errorMessage.
* ----------------
*/
static
PQconninfoOption
*
conninfo_parse
(
const
char
*
conninfo
,
PQExpBuffer
errorMessage
)
...
...
src/interfaces/libpq/fe-exec.c
View file @
2637f887
...
...
@@ -8,7 +8,7 @@
*
*
* 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);
* 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,
* the SQL command did not return tuples).
*
* 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
* allocator doesn't handle that effectively. (Too bad the FE/BE protocol
...
...
@@ -84,6 +85,7 @@ static int getNotice(PGconn *conn);
* 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
* PGresult_data block.
*
* 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
* 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 @@
*
*
* 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)
}
/*
----------------
/*
* lo_initialize
*
* Initialize the large object interface for an existing connection.
* We ask the backend about the functions OID's in pg_proc for all
* functions that are required for large object operations.
* ----------------
*/
static
int
lo_initialize
(
PGconn
*
conn
)
...
...
src/interfaces/libpq/fe-misc.c
View file @
2637f887
...
...
@@ -25,7 +25,7 @@
*
*
* 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 @@
static
int
pqPutBytes
(
const
char
*
s
,
size_t
nbytes
,
PGconn
*
conn
);
/*
--------------------------------------------------------------------- */
/
* pqGetc:
get a character from the connection
All these routines return 0 on success, EOF on error.
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.
*/
/*
* pqGetc:
*
get a character from the connection
*
*
All these routines return 0 on success, EOF on error.
*
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.
*/
int
pqGetc
(
char
*
result
,
PGconn
*
conn
)
{
...
...
@@ -101,9 +101,9 @@ pqPutc(char c, PGconn *conn)
}
/*
--------------------------------------------------------------------- */
/
* pqPutBytes: local routine to write N bytes to the connection,
with buffering
/*
* pqPutBytes: local routine to write N bytes to the connection,
*
with buffering
*/
static
int
pqPutBytes
(
const
char
*
s
,
size_t
nbytes
,
PGconn
*
conn
)
...
...
@@ -160,13 +160,13 @@ pqPutBytes(const char *s, size_t nbytes, PGconn *conn)
return
0
;
}
/*
--------------------------------------------------------------------- */
/
* pqGets:
get a null-terminated string from the connection,
and store it in an expansible PQExpBuffer.
If we run out of memory, all of the string is still read,
but the excess characters are silently discarded.
*/
/*
* pqGets:
*
get a null-terminated string from the connection,
*
and store it in an expansible PQExpBuffer.
*
If we run out of memory, all of the string is still read,
*
but the excess characters are silently discarded.
*/
int
pqGets
(
PQExpBuffer
buf
,
PGconn
*
conn
)
{
...
...
@@ -196,7 +196,7 @@ pqGets(PQExpBuffer buf, PGconn *conn)
return
0
;
}
/* --------------------------------------------------------------------- */
int
pqPuts
(
const
char
*
s
,
PGconn
*
conn
)
{
...
...
@@ -209,10 +209,10 @@ pqPuts(const char *s, PGconn *conn)
return
0
;
}
/*
--------------------------------------------------------------------- */
/
* pqGetnchar:
get a string of exactly len bytes in buffer s, no null termination
*/
/*
* pqGetnchar:
*
get a string of exactly len bytes in buffer s, no null termination
*/
int
pqGetnchar
(
char
*
s
,
size_t
len
,
PGconn
*
conn
)
{
...
...
@@ -230,10 +230,10 @@ pqGetnchar(char *s, size_t len, PGconn *conn)
return
0
;
}
/*
--------------------------------------------------------------------- */
/
* pqPutnchar:
send a string of exactly len bytes, no null termination needed
*/
/*
* pqPutnchar:
*
send a string of exactly len bytes, no null termination needed
*/
int
pqPutnchar
(
const
char
*
s
,
size_t
len
,
PGconn
*
conn
)
{
...
...
@@ -246,11 +246,11 @@ pqPutnchar(const char *s, size_t len, PGconn *conn)
return
0
;
}
/*
--------------------------------------------------------------------- */
/
* pgGetInt
read a 2 or 4 byte integer and convert from network byte order
to local byte order
*/
/*
* pgGetInt
*
read a 2 or 4 byte integer and convert from network byte order
*
to local byte order
*/
int
pqGetInt
(
int
*
result
,
size_t
bytes
,
PGconn
*
conn
)
{
...
...
@@ -288,11 +288,11 @@ pqGetInt(int *result, size_t bytes, PGconn *conn)
return
0
;
}
/*
--------------------------------------------------------------------- */
/
* pgPutInt
send an integer of 2 or 4 bytes, converting from host byte order
to network byte order.
*/
/*
* pgPutInt
*
send an integer of 2 or 4 bytes, converting from host byte order
*
to network byte order.
*/
int
pqPutInt
(
int
value
,
size_t
bytes
,
PGconn
*
conn
)
{
...
...
@@ -326,8 +326,8 @@ pqPutInt(int value, size_t bytes, PGconn *conn)
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.
*/
int
...
...
@@ -360,8 +360,8 @@ retry:
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.
*/
int
...
...
@@ -393,8 +393,8 @@ retry:
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:
* 1: successfully loaded at least one more byte
* 0: no data is presently available, but no error detected
...
...
@@ -402,6 +402,7 @@ retry:
* conn->errorMessage set
* NOTE: callers must not assume that pointers or indexes into conn->inBuffer
* remain valid across this call!
* ----------
*/
int
pqReadData
(
PGconn
*
conn
)
...
...
@@ -600,8 +601,8 @@ definitelyFailed:
return
-
1
;
}
/*
--------------------------------------------------------------------- */
/
* pqFlush: send any data waiting in the output buffer
/*
* pqFlush: send any data waiting in the output buffer
*/
int
pqFlush
(
PGconn
*
conn
)
...
...
@@ -736,8 +737,8 @@ pqFlush(PGconn *conn)
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
* on the socket. The actual error condition will be detected and reported
...
...
src/interfaces/libpq/pqexpbuffer.c
View file @
2637f887
...
...
@@ -17,7 +17,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* 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)
}
}
/*
------------------------
/*
* destroyPQExpBuffer(str);
*
* free()s both the data buffer and the PQExpBufferData.
* This is the inverse of createPQExpBuffer().
*/
...
...
@@ -85,7 +86,7 @@ destroyPQExpBuffer(PQExpBuffer str)
}
}
/*
------------------------
/*
* termPQExpBuffer(str)
* free()s the data buffer but not the PQExpBufferData itself.
* This is the inverse of initPQExpBuffer().
...
...
@@ -103,7 +104,7 @@ termPQExpBuffer(PQExpBuffer str)
str
->
len
=
0
;
}
/*
------------------------
/*
* resetPQExpBuffer
* Reset a PQExpBuffer to empty
*/
...
...
@@ -118,7 +119,7 @@ resetPQExpBuffer(PQExpBuffer str)
}
}
/*
------------------------
/*
* enlargePQExpBuffer
* Make sure there is enough space for 'needed' more bytes in the buffer
* ('needed' does not include the terminating null).
...
...
@@ -155,7 +156,7 @@ enlargePQExpBuffer(PQExpBuffer str, size_t needed)
return
0
;
}
/*
------------------------
/*
* printfPQExpBuffer
* 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.
...
...
@@ -205,7 +206,7 @@ printfPQExpBuffer(PQExpBuffer str, const char *fmt,...)
}
}
/*
------------------------
/*
* appendPQExpBuffer
*
* Format text data under the control of fmt (an sprintf-like format string)
...
...
@@ -254,7 +255,7 @@ appendPQExpBuffer(PQExpBuffer str, const char *fmt,...)
}
}
/*
------------------------
/*
* appendPQExpBufferStr
* Append the given string to a PQExpBuffer, allocating more space
* if necessary.
...
...
@@ -265,7 +266,7 @@ appendPQExpBufferStr(PQExpBuffer str, const char *data)
appendBinaryPQExpBuffer
(
str
,
data
,
strlen
(
data
));
}
/*
------------------------
/*
* appendPQExpBufferChar
* Append a single byte to str.
* 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