34 char **table,
const char **columns)
36 bool inquotes =
false;
37 const char *cp = spec;
43 while (*cp && (*cp !=
'(' || inquotes))
47 if (inquotes && cp[1] ==
'"')
86 "SELECT c.relname, ns.nspname\n"
87 " FROM pg_catalog.pg_class c,"
88 " pg_catalog.pg_namespace ns\n"
89 " WHERE c.relnamespace OPERATOR(pg_catalog.=) ns.oid\n"
90 " AND c.oid OPERATOR(pg_catalog.=) ");
107 "query returned %d rows instead of one: %s",
131#define PG_YESLETTER gettext_noop("y")
133#define PG_NOLETTER gettext_noop("n")
143 snprintf(prompt,
sizeof(prompt),
_(
"%s (%s/%s) "),
164 printf(
_(
"Please answer \"%s\" or \"%s\".\n"),
bool yesno_prompt(const char *question)
void splitTableColumnsSpec(const char *spec, int encoding, char **table, const char **columns)
void appendQualifiedRelation(PQExpBuffer buf, const char *spec, PGconn *conn, bool echo)
#define ngettext(s, p, n)
#define ALWAYS_SECURE_SEARCH_PATH_SQL
int PQclientEncoding(const PGconn *conn)
void PQfinish(PGconn *conn)
char * PQgetvalue(const PGresult *res, int tup_num, int field_num)
void PQclear(PGresult *res)
int PQntuples(const PGresult *res)
int PQmblenBounded(const char *s, int encoding)
#define pg_log_error(...)
char * pnstrdup(const char *in, Size len)
static void executeCommand(PGconn *conn, const char *query)
static PGresult * executeQuery(PGconn *conn, const char *query)
void initPQExpBuffer(PQExpBuffer str)
void appendPQExpBufferStr(PQExpBuffer str, const char *data)
void termPQExpBuffer(PQExpBuffer str)
char * simple_prompt(const char *prompt, bool echo)
const char * fmtQualifiedIdEnc(const char *schema, const char *id, int encoding)
void appendStringLiteralConn(PQExpBuffer buf, const char *str, PGconn *conn)