Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3491520

Browse files
committed
Code review for --quote-all-identifiers patch: add missing --help documentation
for new pg_dump/pg_dumpall parameters, make a couple of trivial stylisticadjustments to make the code follow usual project style.
1 parente20df55 commit3491520

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

‎src/backend/utils/adt/ruleutils.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.329 2010/07/22 01:22:33 rhaas Exp $
12+
* $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.330 2010/08/03 19:24:04 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -132,7 +132,9 @@ static SPIPlanPtr plan_getrulebyoid = NULL;
132132
staticconstchar*query_getrulebyoid="SELECT * FROM pg_catalog.pg_rewrite WHERE oid = $1";
133133
staticSPIPlanPtrplan_getviewrule=NULL;
134134
staticconstchar*query_getviewrule="SELECT * FROM pg_catalog.pg_rewrite WHERE ev_class = $1 AND rulename = $2";
135-
boolquote_all_identifiers;
135+
136+
/* GUC parameters */
137+
boolquote_all_identifiers= false;
136138

137139

138140
/* ----------

‎src/bin/pg_dump/dumputils.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $PostgreSQL: pgsql/src/bin/pg_dump/dumputils.c,v 1.57 2010/07/22 01:22:34 rhaas Exp $
11+
* $PostgreSQL: pgsql/src/bin/pg_dump/dumputils.c,v 1.58 2010/08/03 19:24:04 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -21,6 +21,9 @@
2121
#include"parser/keywords.h"
2222

2323

24+
intquote_all_identifiers=0;
25+
26+
2427
#definesupports_grant_options(version) ((version) >= 70400)
2528

2629
staticboolparseAclItem(constchar*item,constchar*type,
@@ -36,8 +39,6 @@ static bool parallel_init_done = false;
3639
staticDWORDtls_index;
3740
#endif
3841

39-
intquote_all_identifiers;
40-
4142
void
4243
init_parallel_dump_utils(void)
4344
{

‎src/bin/pg_dump/dumputils.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $PostgreSQL: pgsql/src/bin/pg_dump/dumputils.h,v 1.30 2010/07/22 01:22:34 rhaas Exp $
11+
* $PostgreSQL: pgsql/src/bin/pg_dump/dumputils.h,v 1.31 2010/08/03 19:24:04 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -19,6 +19,8 @@
1919
#include"libpq-fe.h"
2020
#include"pqexpbuffer.h"
2121

22+
externintquote_all_identifiers;
23+
2224
externvoidinit_parallel_dump_utils(void);
2325
externconstchar*fmtId(constchar*identifier);
2426
externvoidappendStringLiteral(PQExpBufferbuf,constchar*str,
@@ -46,6 +48,4 @@ extern bool processSQLNamePattern(PGconn *conn, PQExpBuffer buf,
4648
constchar*schemavar,constchar*namevar,
4749
constchar*altnamevar,constchar*visibilityrule);
4850

49-
externintquote_all_identifiers;
50-
5151
#endif/* DUMPUTILS_H */

‎src/bin/pg_dump/pg_dump.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*http://archives.postgresql.org/pgsql-bugs/2010-02/msg00187.php
2626
*
2727
* IDENTIFICATION
28-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.583 2010/07/22 01:22:34 rhaas Exp $
28+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.584 2010/08/03 19:24:04 tgl Exp $
2929
*
3030
*-------------------------------------------------------------------------
3131
*/
@@ -836,6 +836,7 @@ help(const char *progname)
836836
printf(_(" --disable-dollar-quoting disable dollar quoting, use SQL standard quoting\n"));
837837
printf(_(" --disable-triggers disable triggers during data-only restore\n"));
838838
printf(_(" --no-tablespaces do not dump tablespace assignments\n"));
839+
printf(_(" --quote-all-identifiers quote all identifiers, even if not keywords\n"));
839840
printf(_(" --role=ROLENAME do SET ROLE before dump\n"));
840841
printf(_(" --use-set-session-authorization\n"
841842
" use SET SESSION AUTHORIZATION commands instead of\n"

‎src/bin/pg_dump/pg_dumpall.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1994, Regents of the University of California
77
*
88
*
9-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.136 2010/07/22 01:25:01 rhaas Exp $
9+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dumpall.c,v 1.137 2010/08/03 19:24:05 tgl Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -564,6 +564,7 @@ help(void)
564564
printf(_(" --disable-dollar-quoting disable dollar quoting, use SQL standard quoting\n"));
565565
printf(_(" --disable-triggers disable triggers during data-only restore\n"));
566566
printf(_(" --no-tablespaces do not dump tablespace assignments\n"));
567+
printf(_(" --quote-all-identifiers quote all identifiers, even if not keywords\n"));
567568
printf(_(" --role=ROLENAME do SET ROLE before dump\n"));
568569
printf(_(" --use-set-session-authorization\n"
569570
" use SET SESSION AUTHORIZATION commands instead of\n"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp