Re: ECPG: proposal for new DECLARE STATEMENT

Tomas Vondra <[email protected]> Sun, 12 Jan 2020 04:41:03 +0100
Newsgroups gmane.comp.db.postgresql.devel.general
Message-ID <20200112034103.fopfccr634ppbh36@development>
On Sun, Jan 12, 2020 at 03:52:48AM +0100, Tomas Vondra wrote:
> ...
>
>I'm not an ecpg expert (in fact I've never even used it), so my review
>is pretty superficial, but I only found a couple of minor whitespace
>issues (adding/removing a line/tab) - see the attached file.
>

Meh, forgot to attach the file ...


regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
minor-fixes.txt (text/plain, 1.6 KB)
diff --git a/src/interfaces/ecpg/preproc/ecpg.addons b/src/interfaces/ecpg/preproc/ecpg.addons
index 01b36e3a3d..5fcc90dc84 100644
--- a/src/interfaces/ecpg/preproc/ecpg.addons
+++ b/src/interfaces/ecpg/preproc/ecpg.addons
@@ -60,7 +60,6 @@ ECPG: stmtPrepareStmt block
 		check_declared_list($1.name);
 		if ($1.type == NULL)
 			output_prepare_statement($1.name, $1.stmt);
-
 		else if (strlen($1.type) == 0)
 		{
 			char *stmt = cat_str(3, mm_strdup("\""), $1.stmt, mm_strdup("\""));
diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c
index 1e8a3e6b60..93696ceb3c 100644
--- a/src/interfaces/ecpg/preproc/ecpg.c
+++ b/src/interfaces/ecpg/preproc/ecpg.c
@@ -495,7 +495,6 @@ main(int argc, char *const argv[])
 			}
 
 			free(input_filename);
-
 		}
 	}
 	return ret_value;
diff --git a/src/interfaces/ecpg/preproc/ecpg.trailer b/src/interfaces/ecpg/preproc/ecpg.trailer
index 8e65d24036..052ec24077 100644
--- a/src/interfaces/ecpg/preproc/ecpg.trailer
+++ b/src/interfaces/ecpg/preproc/ecpg.trailer
@@ -21,7 +21,7 @@ statement: ecpgstart at stmt ';' { connection = NULL; }
 			remove_typedefs(braces_open);
 			remove_variables(braces_open--);
 			if (braces_open == 0)
-		{
+			{
 				free(current_function);
 				current_function = NULL;
 			}
diff --git a/src/interfaces/ecpg/preproc/output.c b/src/interfaces/ecpg/preproc/output.c
index 94bc433ed5..65d06d5794 100644
--- a/src/interfaces/ecpg/preproc/output.c
+++ b/src/interfaces/ecpg/preproc/output.c
@@ -258,4 +258,3 @@ output_escaped_str(char *str, bool quoted)
 	if (quoted && str[0] == '"' && str[len] == '"')
 		fputs("\"", base_yyout);
 }
-