Some whitespaces in utility.c

Started by Michael Paquierover 13 years ago4 messages
#1Michael Paquier
michael.paquier@gmail.com
1 attachment(s)

Hi all,

I found some whitespace characters in utility.c introduced by commit
3a0e4d3.
Please find attached a patch fixing that which can be applied on postgres
master (commit 2f0c7d5).

Thanks,
--
Michael Paquier
http://michael.otacoo.com

Attachments:

20120906_utility_whitespace.patchapplication/octet-stream; name=20120906_utility_whitespace.patchDownload
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index ce8a8b1..fde2c82 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -778,7 +778,7 @@ standard_ProcessUtility(Node *parsetree,
 				ListCell   *l;
 				LOCKMODE	lockmode;
 
-				if (isCompleteQuery)	
+				if (isCompleteQuery)
 					EventTriggerDDLCommandStart(parsetree);
 
 				/*
@@ -832,7 +832,7 @@ standard_ProcessUtility(Node *parsetree,
 			{
 				AlterDomainStmt *stmt = (AlterDomainStmt *) parsetree;
 
-				if (isCompleteQuery)	
+				if (isCompleteQuery)
 					EventTriggerDDLCommandStart(parsetree);
 
 				/*
@@ -889,7 +889,7 @@ standard_ProcessUtility(Node *parsetree,
 			break;
 
 		case T_AlterDefaultPrivilegesStmt:
-			if (isCompleteQuery)	
+			if (isCompleteQuery)
 				EventTriggerDDLCommandStart(parsetree);
 			ExecAlterDefaultPrivilegesStmt((AlterDefaultPrivilegesStmt *) parsetree);
 			break;
@@ -901,7 +901,7 @@ standard_ProcessUtility(Node *parsetree,
 			{
 				DefineStmt *stmt = (DefineStmt *) parsetree;
 
-				if (isCompleteQuery)	
+				if (isCompleteQuery)
 					EventTriggerDDLCommandStart(parsetree);
 
 				switch (stmt->kind)
@@ -950,7 +950,7 @@ standard_ProcessUtility(Node *parsetree,
 			{
 				CompositeTypeStmt *stmt = (CompositeTypeStmt *) parsetree;
 
-				if (isCompleteQuery)	
+				if (isCompleteQuery)
 					EventTriggerDDLCommandStart(parsetree);
 
 				DefineCompositeType(stmt->typevar, stmt->coldeflist);
@@ -958,19 +958,19 @@ standard_ProcessUtility(Node *parsetree,
 			break;
 
 		case T_CreateEnumStmt:	/* CREATE TYPE AS ENUM */
-			if (isCompleteQuery)	
+			if (isCompleteQuery)
 				EventTriggerDDLCommandStart(parsetree);
 			DefineEnum((CreateEnumStmt *) parsetree);
 			break;
 
 		case T_CreateRangeStmt:	/* CREATE TYPE AS RANGE */
-			if (isCompleteQuery)	
+			if (isCompleteQuery)
 				EventTriggerDDLCommandStart(parsetree);
 			DefineRange((CreateRangeStmt *) parsetree);
 			break;
 
 		case T_AlterEnumStmt:	/* ALTER TYPE (enum) */
-			if (isCompleteQuery)	
+			if (isCompleteQuery)
 				EventTriggerDDLCommandStart(parsetree);
 
 			/*
@@ -983,19 +983,19 @@ standard_ProcessUtility(Node *parsetree,
 			break;
 
 		case T_ViewStmt:		/* CREATE VIEW */
-			if (isCompleteQuery)	
+			if (isCompleteQuery)
 				EventTriggerDDLCommandStart(parsetree);
 			DefineView((ViewStmt *) parsetree, queryString);
 			break;
 
 		case T_CreateFunctionStmt:		/* CREATE FUNCTION */
-			if (isCompleteQuery)	
+			if (isCompleteQuery)
 				EventTriggerDDLCommandStart(parsetree);
 			CreateFunction((CreateFunctionStmt *) parsetree, queryString);
 			break;
 
 		case T_AlterFunctionStmt:		/* ALTER FUNCTION */
-			if (isCompleteQuery)	
+			if (isCompleteQuery)
 				EventTriggerDDLCommandStart(parsetree);
 			AlterFunction((AlterFunctionStmt *) parsetree);
 			break;
@@ -1004,7 +1004,7 @@ standard_ProcessUtility(Node *parsetree,
 			{
 				IndexStmt  *stmt = (IndexStmt *) parsetree;
 
-				if (isCompleteQuery)	
+				if (isCompleteQuery)
 					EventTriggerDDLCommandStart(parsetree);
 				if (stmt->concurrent)
 					PreventTransactionChain(isTopLevel,
@@ -1026,19 +1026,19 @@ standard_ProcessUtility(Node *parsetree,
 			break;
 
 		case T_RuleStmt:		/* CREATE RULE */
-			if (isCompleteQuery)	
+			if (isCompleteQuery)
 				EventTriggerDDLCommandStart(parsetree);
 			DefineRule((RuleStmt *) parsetree, queryString);
 			break;
 
 		case T_CreateSeqStmt:
-			if (isCompleteQuery)	
+			if (isCompleteQuery)
 				EventTriggerDDLCommandStart(parsetree);
 			DefineSequence((CreateSeqStmt *) parsetree);
 			break;
 
 		case T_AlterSeqStmt:
-			if (isCompleteQuery)	
+			if (isCompleteQuery)
 				EventTriggerDDLCommandStart(parsetree);
 			AlterSequence((AlterSeqStmt *) parsetree);
 			break;
#2Magnus Hagander
magnus@hagander.net
In reply to: Michael Paquier (#1)
Re: Some whitespaces in utility.c

On Tue, Sep 4, 2012 at 6:57 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:

Hi all,

I found some whitespace characters in utility.c introduced by commit
3a0e4d3.
Please find attached a patch fixing that which can be applied on postgres
master (commit 2f0c7d5).

That probably exists in many other places in the source as well, but
it's certainly fairly ugly. So I see nothing wrong cleaning it up whe
nspotted.

Thus, patch applied, thanks!

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Magnus Hagander (#2)
Re: Some whitespaces in utility.c

Magnus Hagander <magnus@hagander.net> writes:

On Tue, Sep 4, 2012 at 6:57 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:

I found some whitespace characters in utility.c introduced by commit
3a0e4d3.
Please find attached a patch fixing that which can be applied on postgres
master (commit 2f0c7d5).

That probably exists in many other places in the source as well, but
it's certainly fairly ugly. So I see nothing wrong cleaning it up whe
nspotted.

Just as a note: we generally leave it to pgindent to fix this sort of
thing. I'm not sure it's worth the effort of submitting manual patches
for, unless you have reason to think the next pgindent run won't fix it.

regards, tom lane

#4Michael Paquier
michael.paquier@gmail.com
In reply to: Tom Lane (#3)
Re: Some whitespaces in utility.c

On Tue, Sep 4, 2012 at 11:35 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Magnus Hagander <magnus@hagander.net> writes:

On Tue, Sep 4, 2012 at 6:57 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:

I found some whitespace characters in utility.c introduced by commit
3a0e4d3.
Please find attached a patch fixing that which can be applied on

postgres

master (commit 2f0c7d5).

That probably exists in many other places in the source as well, but
it's certainly fairly ugly. So I see nothing wrong cleaning it up whe
nspotted.

Just as a note: we generally leave it to pgindent to fix this sort of
thing. I'm not sure it's worth the effort of submitting manual patches
for, unless you have reason to think the next pgindent run won't fix it.

Understood, thanks for telling about that.
I just read some code and bumped into it, for sure doing such maintenance
all at once with pgindent saves time and effort.
--
Michael Paquier
http://michael.otacoo.com