mirror of https://github.com/postgres/postgres
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.9 KiB
49 lines
1.9 KiB
/*-------------------------------------------------------------------------
|
|
*
|
|
* Utility routines for SQL dumping
|
|
* Basically this is stuff that is useful in both pg_dump and pg_dumpall.
|
|
* Lately it's also being used by psql and bin/scripts/ ...
|
|
*
|
|
*
|
|
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
*
|
|
* $PostgreSQL: pgsql/src/bin/pg_dump/dumputils.h,v 1.26 2009/10/05 19:24:45 tgl Exp $
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
|
|
#ifndef DUMPUTILS_H
|
|
#define DUMPUTILS_H
|
|
|
|
#include "libpq-fe.h"
|
|
#include "pqexpbuffer.h"
|
|
|
|
extern void init_parallel_dump_utils(void);
|
|
extern const char *fmtId(const char *identifier);
|
|
extern void appendStringLiteral(PQExpBuffer buf, const char *str,
|
|
int encoding, bool std_strings);
|
|
extern void appendStringLiteralConn(PQExpBuffer buf, const char *str,
|
|
PGconn *conn);
|
|
extern void appendStringLiteralDQ(PQExpBuffer buf, const char *str,
|
|
const char *dqprefix);
|
|
extern void appendByteaLiteral(PQExpBuffer buf,
|
|
const unsigned char *str, size_t length,
|
|
bool std_strings);
|
|
extern int parse_version(const char *versionString);
|
|
extern bool parsePGArray(const char *atext, char ***itemarray, int *nitems);
|
|
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 processSQLNamePattern(PGconn *conn, PQExpBuffer buf,
|
|
const char *pattern,
|
|
bool have_where, bool force_escape,
|
|
const char *schemavar, const char *namevar,
|
|
const char *altnamevar, const char *visibilityrule);
|
|
|
|
#endif /* DUMPUTILS_H */
|
|
|