1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-19 23:22:23 +03:00

Fixed psql double quoting of SQL ids

Fixed libpq printing functions
This commit is contained in:
Peter Eisentraut
2000-02-07 23:10:11 +00:00
parent 4842ef8624
commit 9ceb5d8a7b
29 changed files with 1047 additions and 770 deletions

View File

@@ -17,7 +17,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Header: /cvsroot/pgsql/src/interfaces/libpq/pqexpbuffer.c,v 1.4 2000/01/26 05:58:46 momjian Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/pqexpbuffer.c,v 1.5 2000/02/07 23:10:11 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -124,9 +124,9 @@ resetPQExpBuffer(PQExpBuffer str)
* Returns 1 if OK, 0 if failed to enlarge buffer.
*/
int
enlargePQExpBuffer(PQExpBuffer str, int needed)
enlargePQExpBuffer(PQExpBuffer str, size_t needed)
{
int newlen;
size_t newlen;
char *newdata;
needed += str->len + 1; /* total space required now */
@@ -164,8 +164,8 @@ void
printfPQExpBuffer(PQExpBuffer str, const char *fmt,...)
{
va_list args;
int avail,
nprinted;
size_t avail;
int nprinted;
resetPQExpBuffer(str);
@@ -214,8 +214,8 @@ void
appendPQExpBuffer(PQExpBuffer str, const char *fmt,...)
{
va_list args;
int avail,
nprinted;
size_t avail;
int nprinted;
for (;;)
{
@@ -286,7 +286,7 @@ appendPQExpBufferChar(PQExpBuffer str, char ch)
* if necessary.
*/
void
appendBinaryPQExpBuffer(PQExpBuffer str, const char *data, int datalen)
appendBinaryPQExpBuffer(PQExpBuffer str, const char *data, size_t datalen)
{
/* Make more room if needed */
if (! enlargePQExpBuffer(str, datalen))