提交 24a0f021 编写于 作者: B Bruce Momjian

Hi, all

I finally got around to schlepping through pg_dump, to finish what I started
about three months (or more) ago.  Attached is a gzipped diff file to apply
in the bin/pg_dump directory.  This should remove all string length
dependencies, except one, which I'm working on.  It has been through some
rudimentary unit testing, but that's about it, so if any of you would give
it a more strenuous run-through, I'd be grateful for the feedback.

Cheers...

 Ansley, Michael
上级 bc036a06
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.35 1999/11/22 17:56:36 momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.36 1999/12/27 15:42:43 momjian Exp $
*
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
*
......@@ -39,6 +39,8 @@ static void flagInhAttrs(TableInfo *tbinfo, int numTables,
InhInfo *inhinfo, int numInherits);
static int strInArray(const char *pattern, char **arr, int arr_size);
PQExpBuffer id_return;
/*
* findTypeByOid
* given an oid of a type, return its typename
......@@ -496,7 +498,11 @@ const char *
fmtId(const char *rawid, bool force_quotes)
{
const char *cp;
static char id[MAX_QUERY_SIZE];
if (id_return)
resetPQExpBuffer(id_return);
else
id_return = createPQExpBuffer();
if (!force_quotes)
for (cp = rawid; *cp != '\0'; cp++)
......@@ -505,12 +511,13 @@ fmtId(const char *rawid, bool force_quotes)
if (force_quotes || (*cp != '\0'))
{
strcpy(id, "\"");
strcat(id, rawid);
strcat(id, "\"");
cp = id;
appendPQExpBuffer(id_return, "\"");
appendPQExpBuffer(id_return, rawid);
appendPQExpBuffer(id_return, "\"");
}
else
cp = rawid;
appendPQExpBuffer(id_return, rawid);
cp = id_return->data;
return cp;
} /* fmtId() */
此差异已折叠。
......@@ -5,7 +5,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_dump.h,v 1.42 1999/12/11 00:31:05 momjian Exp $
* $Id: pg_dump.h,v 1.43 1999/12/27 15:42:44 momjian Exp $
*
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
*
......@@ -22,6 +22,7 @@
#ifndef PG_DUMP_H
#define PG_DUMP_H
#include "pqexpbuffer.h"
#include "catalog/pg_index.h"
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册