fmtId() and pg_dump - Mailing list pgsql-patches

From nconway@klamath.dyndns.org (Neil Conway)
Subject fmtId() and pg_dump
Date
Msg-id 20020724232132.GA17480@klamath.dyndns.org
Whole thread Raw
Responses Re: fmtId() and pg_dump  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
The attached patch implements the scheme outlined on -hackers a little
while ago for reducing the usage of fmtId() in pg_dump. This is just
a "proof of concept" -- I added a simple wrapper over
appendPQExpBuffer() that takes an extra formatting sequence. The
implementation is pretty trivial -- the assumption is made that

    (a) all printf-like formatting sequences consist of a '%' followed
        by a single character

    (b) any occurance of a '%' is a part of a formatting string

I've converted a few of the places where fmtId() is used over to the new
syntax. The reason I'm posting the patch is to get some feedback:
is this a better method can just calling fmtId()?

If so, I'll add some comments, convert all the code to use the wrapper
as necessary, and think up a better name for the wrapper function.

Cheers,

Neil

--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC

Attachment

pgsql-patches by date:

Previous
From: nconway@klamath.dyndns.org (Neil Conway)
Date:
Subject: inet support for contrib/array
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: small psql patch - show Schema name for \dt \dv \dS