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
This commit is contained in:
Bruce Momjian 1999-12-27 15:42:44 +00:00
parent bc036a063d
commit 24a0f021ef
3 changed files with 295 additions and 264 deletions

View File

@ -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,8 +498,12 @@ 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++)
if (!(islower(*cp) || isdigit(*cp) || (*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() */

File diff suppressed because it is too large Load Diff

View File

@ -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"
/*