mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
Escape processing patch:
o turns off escape_string_warning in pg_dumpall.c o optionally use E'' for \password (undocumented option?) o honor standard_conforming-strings for \copy (but not support literal E'' strings) o optionally use E'' for \d commands o turn off escape_string_warning for createdb, createuser, droplang
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2000-2006, PostgreSQL Global Development Group
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.137 2006/05/28 21:13:54 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.138 2006/05/31 11:02:42 momjian Exp $
|
||||
*/
|
||||
#include "postgres_fe.h"
|
||||
#include "describe.h"
|
||||
@ -1907,14 +1907,17 @@ processNamePattern(PQExpBuffer buf, const char *pattern,
|
||||
if (altnamevar)
|
||||
{
|
||||
appendPQExpBuffer(buf, "(%s ~ ", namevar);
|
||||
appendPQExpBufferChar(buf, NEED_E_STR(namebuf.data));
|
||||
appendStringLiteralConn(buf, namebuf.data, pset.db);
|
||||
appendPQExpBuffer(buf, "\n OR %s ~ ", altnamevar);
|
||||
appendPQExpBufferChar(buf, NEED_E_STR(namebuf.data));
|
||||
appendStringLiteralConn(buf, namebuf.data, pset.db);
|
||||
appendPQExpBuffer(buf, ")\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
appendPQExpBuffer(buf, "%s ~ ", namevar);
|
||||
appendPQExpBufferChar(buf, NEED_E_STR(namebuf.data));
|
||||
appendStringLiteralConn(buf, namebuf.data, pset.db);
|
||||
appendPQExpBufferChar(buf, '\n');
|
||||
}
|
||||
@ -1938,6 +1941,7 @@ processNamePattern(PQExpBuffer buf, const char *pattern,
|
||||
{
|
||||
WHEREAND();
|
||||
appendPQExpBuffer(buf, "%s ~ ", schemavar);
|
||||
appendPQExpBufferChar(buf, NEED_E_STR(schemabuf.data));
|
||||
appendStringLiteralConn(buf, schemabuf.data, pset.db);
|
||||
appendPQExpBufferChar(buf, '\n');
|
||||
}
|
||||
|
Reference in New Issue
Block a user