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

Commitfd9df11

Browse files
committed
Small stylistic improvement in recent FORCE QUOTE * code - use a bool instead of a magic value.
1 parentde7531a commitfd9df11

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

‎src/backend/commands/copy.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/commands/copy.c,v 1.313 2009/07/2500:07:11 adunstan Exp $
11+
* $PostgreSQL: pgsql/src/backend/commands/copy.c,v 1.314 2009/07/2513:35:32 adunstan Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -729,9 +729,7 @@ DoCopy(const CopyStmt *stmt, const char *queryString)
729729
TupleDesctupDesc;
730730
intnum_phys_attrs;
731731
uint64processed;
732-
733-
/* a dummy list that represents 'all-columns' */
734-
Listall_columns= {T_List };
732+
boolforce_quote_all= false;
735733

736734
/* Allocate workspace and zero all fields */
737735
cstate= (CopyStateData*)palloc0(sizeof(CopyStateData));
@@ -813,7 +811,7 @@ DoCopy(const CopyStmt *stmt, const char *queryString)
813811
errmsg("conflicting or redundant options")));
814812

815813
if (IsA(defel->arg,A_Star))
816-
force_quote=&all_columns;
814+
force_quote_all=true;
817815
else
818816
force_quote= (List*)defel->arg;
819817
}
@@ -1099,7 +1097,7 @@ DoCopy(const CopyStmt *stmt, const char *queryString)
10991097

11001098
/* Convert FORCE QUOTE name list to per-column flags, check validity */
11011099
cstate->force_quote_flags= (bool*)palloc0(num_phys_attrs*sizeof(bool));
1102-
if (force_quote==&all_columns)
1100+
if (force_quote_all)
11031101
{
11041102
inti;
11051103

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp