I wrote: > I have a modest proposal for improving this: let's move all the code > that's currently shared by two or more src/bin/ subdirectories into a > new directory, say src/feutils, and build it into a ".a" library in > the same way that src/common/ is handled.
Moving along on this project: I'm looking at pg_dump's dumputils.c/.h, which contains a fair amount of generally-useful stuff but also some stuff that seems to have no earthly use outside pg_dump/pg_dumpall. In particular I do not see the point of moving these things to a shared directory: PGDUMP_STRFTIME_FMT macro extern bool buildACLCommands(const char *name, const char *subname, const char *type, const char *acls, const char *owner, const char *prefix, int remoteVersion, PQExpBuffer sql); extern bool buildDefaultACLCommands(const char *type, const char *nspname, const char *acls, const char *owner, int remoteVersion, PQExpBuffer sql); extern void buildShSecLabelQuery(PGconn *conn, const char *catalog_name, uint32 objectId, PQExpBuffer sql); extern void emitShSecLabels(PGconn *conn, PGresult *res, PQExpBuffer buffer, const char *target, const char *objname); What I propose doing is leaving the above-listed items in pg_dump/dumputils.h/.c, and moving the rest of what's in those files to new files src/include/fe_utils/string_utils.h and src/fe_utils/string_utils.c. This name is a bit arbitrary, but most of what's there is string processing of some flavor or other, with some list processing thrown in for good measure. If anyone's got a different color to paint this bikeshed, please speak up. regards, tom lane -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers