Skip site navigation (1) Skip section navigation (2)

fmtId() and pg_dump

From: nconway(at)klamath(dot)dyndns(dot)org (Neil Conway)
To: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: fmtId() and pg_dump
Date: 2002-07-24 23:21:32
Message-ID: 20020724232132.GA17480@klamath.dyndns.org (view raw or flat)
Thread:
Lists: 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(at)rogers(dot)com>
PGP Key ID: DB3C29FC

Responses

pgsql-patches by date

Next:From: Greg Sabino MullaneDate: 2002-07-25 01:23:09
Subject: Re: small psql patch - show Schema name for \dt \dv \dS
Previous:From: Joe ConwayDate: 2002-07-24 16:51:10
Subject: Proposal: anonymous composite types for Table Functions (aka SRFs)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group