Force a checkpoint in CREATE DATABASE before starting to copy the files,
[PostgreSQL.git] / src / bin / pg_dump / dumputils.h
blobb51d6f92bc5d21007595688ff523dfddf5dd3019
1 /*-------------------------------------------------------------------------
3 * Utility routines for SQL dumping
4 * Basically this is stuff that is useful in both pg_dump and pg_dumpall.
5 * Lately it's also being used by psql and bin/scripts/ ...
8 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
9 * Portions Copyright (c) 1994, Regents of the University of California
11 * $PostgreSQL$
13 *-------------------------------------------------------------------------
16 #ifndef DUMPUTILS_H
17 #define DUMPUTILS_H
19 #include "libpq-fe.h"
20 #include "pqexpbuffer.h"
22 extern const char *fmtId(const char *identifier);
23 extern void appendStringLiteral(PQExpBuffer buf, const char *str,
24 int encoding, bool std_strings);
25 extern void appendStringLiteralConn(PQExpBuffer buf, const char *str,
26 PGconn *conn);
27 extern void appendStringLiteralDQ(PQExpBuffer buf, const char *str,
28 const char *dqprefix);
29 extern int parse_version(const char *versionString);
30 extern bool parsePGArray(const char *atext, char ***itemarray, int *nitems);
31 extern bool buildACLCommands(const char *name, const char *type,
32 const char *acls, const char *owner,
33 int remoteVersion,
34 PQExpBuffer sql);
35 extern void processSQLNamePattern(PGconn *conn, PQExpBuffer buf,
36 const char *pattern,
37 bool have_where, bool force_escape,
38 const char *schemavar, const char *namevar,
39 const char *altnamevar, const char *visibilityrule);
41 #endif /* DUMPUTILS_H */