PostgreSQL Source Code
git master
|
#include "postgres_fe.h"
#include <ctype.h>
#include "dumputils.h"
#include "fe_utils/string_utils.h"
Go to the source code of this file.
Macros | |
#define | CONVERT_PRIV(code, keywd) |
Functions | |
static bool | parseAclItem (const char *item, const char *type, const char *name, const char *subname, int remoteVersion, PQExpBuffer grantee, PQExpBuffer grantor, PQExpBuffer privs, PQExpBuffer privswgo) |
static char * | dequoteAclUserName (PQExpBuffer output, char *input) |
static void | AddAcl (PQExpBuffer aclbuf, const char *keyword, const char *subname) |
bool | buildACLCommands (const char *name, const char *subname, const char *nspname, const char *type, const char *acls, const char *baseacls, const char *owner, const char *prefix, int remoteVersion, PQExpBuffer sql) |
bool | buildDefaultACLCommands (const char *type, const char *nspname, const char *acls, const char *acldefault, const char *owner, int remoteVersion, PQExpBuffer sql) |
void | quoteAclUserName (PQExpBuffer output, const char *input) |
void | buildShSecLabelQuery (const char *catalog_name, Oid objectId, PQExpBuffer sql) |
void | emitShSecLabels (PGconn *conn, PGresult *res, PQExpBuffer buffer, const char *objtype, const char *objname) |
bool | variable_is_guc_list_quote (const char *name) |
bool | SplitGUCList (char *rawstring, char separator, char ***namelist) |
void | makeAlterConfigCommand (PGconn *conn, const char *configitem, const char *type, const char *name, const char *type2, const char *name2, PQExpBuffer buf) |
#define CONVERT_PRIV | ( | code, | |
keywd | |||
) |
|
static |
Definition at line 617 of file dumputils.c.
References appendPQExpBuffer(), appendPQExpBufferChar(), appendPQExpBufferStr(), PQExpBufferData::len, and subname.
bool buildACLCommands | ( | const char * | name, |
const char * | subname, | ||
const char * | nspname, | ||
const char * | type, | ||
const char * | acls, | ||
const char * | baseacls, | ||
const char * | owner, | ||
const char * | prefix, | ||
int | remoteVersion, | ||
PQExpBuffer | sql | ||
) |
Definition at line 64 of file dumputils.c.
References appendPQExpBuffer(), appendPQExpBufferStr(), createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), fmtId(), free, i, j, PQExpBufferData::len, name, parseAclItem(), parsePGArray(), pg_malloc(), printfPQExpBuffer(), subname, and type.
Referenced by buildDefaultACLCommands(), dumpACL(), dumpRoleGUCPrivs(), and dumpTablespaces().
bool buildDefaultACLCommands | ( | const char * | type, |
const char * | nspname, | ||
const char * | acls, | ||
const char * | acldefault, | ||
const char * | owner, | ||
int | remoteVersion, | ||
PQExpBuffer | sql | ||
) |
Definition at line 326 of file dumputils.c.
References acldefault(), appendPQExpBuffer(), buildACLCommands(), createPQExpBuffer(), PQExpBufferData::data, destroyPQExpBuffer(), fmtId(), and type.
Referenced by dumpDefaultACL().
void buildShSecLabelQuery | ( | const char * | catalog_name, |
Oid | objectId, | ||
PQExpBuffer | sql | ||
) |
Definition at line 637 of file dumputils.c.
References appendPQExpBuffer().
Referenced by buildShSecLabels(), and dumpDatabase().
|
static |
Definition at line 578 of file dumputils.c.
References appendPQExpBufferChar(), input, output, and resetPQExpBuffer().
Referenced by parseAclItem().
void emitShSecLabels | ( | PGconn * | conn, |
PGresult * | res, | ||
PQExpBuffer | buffer, | ||
const char * | objtype, | ||
const char * | objname | ||
) |
Definition at line 655 of file dumputils.c.
References appendPQExpBuffer(), appendPQExpBufferStr(), appendStringLiteralConn(), conn, fmtId(), i, label, PQgetvalue(), PQntuples(), provider, and res.
Referenced by buildShSecLabels(), and dumpDatabase().
void makeAlterConfigCommand | ( | PGconn * | conn, |
const char * | configitem, | ||
const char * | type, | ||
const char * | name, | ||
const char * | type2, | ||
const char * | name2, | ||
PQExpBuffer | buf | ||
) |
Definition at line 823 of file dumputils.c.
References appendPQExpBuffer(), appendPQExpBufferStr(), appendStringLiteralConn(), buf, conn, fmtId(), name, pg_free(), pg_strdup(), SplitGUCList(), type, and variable_is_guc_list_quote().
Referenced by dumpDatabaseConfig(), and dumpUserConfig().
|
static |
Definition at line 383 of file dumputils.c.
References appendPQExpBuffer(), buf, CONVERT_PRIV, dequoteAclUserName(), pg_free(), pg_strdup(), printfPQExpBuffer(), resetPQExpBuffer(), subname, and type.
Referenced by buildACLCommands().
void quoteAclUserName | ( | PQExpBuffer | output, |
const char * | input | ||
) |
Definition at line 544 of file dumputils.c.
References appendPQExpBufferChar(), input, and output.
Referenced by getNamespaces().
bool SplitGUCList | ( | char * | rawstring, |
char | separator, | ||
char *** | namelist | ||
) |
Definition at line 723 of file dumputils.c.
References pg_malloc().
Referenced by makeAlterConfigCommand().
bool variable_is_guc_list_quote | ( | const char * | name | ) |
Definition at line 689 of file dumputils.c.
References name, and pg_strcasecmp().
Referenced by dumpFunc(), and makeAlterConfigCommand().