aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/preproc
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2008-12-29 17:07:06 +0000
committerMichael Meskes <meskes@postgresql.org>2008-12-29 17:07:06 +0000
commit3c82099c82e2b51a09ab2317df26ef094ad7cc06 (patch)
treec5e54e5e28c18c7b9d5aee1bd8bb0e4eac8c169b /src/interfaces/ecpg/preproc
parent2f806e540fe48c49188956a794bf9cef1a7645a2 (diff)
downloadpostgresql-3c82099c82e2b51a09ab2317df26ef094ad7cc06.tar.gz
postgresql-3c82099c82e2b51a09ab2317df26ef094ad7cc06.zip
First rounf of whitespace changes. Everything but connect-test1 should be fine.
Diffstat (limited to 'src/interfaces/ecpg/preproc')
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.addons6
-rw-r--r--src/interfaces/ecpg/preproc/ecpg.header5
2 files changed, 6 insertions, 5 deletions
diff --git a/src/interfaces/ecpg/preproc/ecpg.addons b/src/interfaces/ecpg/preproc/ecpg.addons
index e060ceb7261..03f29b1e67c 100644
--- a/src/interfaces/ecpg/preproc/ecpg.addons
+++ b/src/interfaces/ecpg/preproc/ecpg.addons
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.addons,v 1.1 2008/11/14 10:03:33 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.addons,v 1.2 2008/12/29 17:07:05 meskes Exp $ */
ECPG: stmtClosePortalStmt block
{
@@ -207,7 +207,7 @@ ECPG: ConstraintAttributeSpecConstraintTimeSpecConstraintDeferrabilitySpec addon
mmerror(PARSE_ERROR, ET_ERROR, "INITIALLY DEFERRED constraint must be DEFERRABLE\n");
ECPG: var_valueNumericOnly addon
ECPG: fetch_directionSignedIconst addon
- if ($1[1] == '$')
+ if ($1[0] == '$')
{
free($1);
$1 = make_str("$0");
@@ -216,7 +216,7 @@ ECPG: fetch_directionABSOLUTE_PSignedIconst addon
ECPG: fetch_directionRELATIVE_PSignedIconst addon
ECPG: fetch_directionFORWARDSignedIconst addon
ECPG: fetch_directionBACKWARDSignedIconst addon
- if ($2[1] == '$')
+ if ($2[0] == '$')
{
free($2);
$2 = make_str("$0");
diff --git a/src/interfaces/ecpg/preproc/ecpg.header b/src/interfaces/ecpg/preproc/ecpg.header
index ccd1aec898f..ae3f7fa620a 100644
--- a/src/interfaces/ecpg/preproc/ecpg.header
+++ b/src/interfaces/ecpg/preproc/ecpg.header
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.3 2008/11/26 08:45:12 petere Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.header,v 1.4 2008/12/29 17:07:05 meskes Exp $ */
/* Copyright comment */
%{
@@ -111,7 +111,8 @@ cat2_str(char *str1, char *str2)
char * res_str = (char *)mm_alloc(strlen(str1) + strlen(str2) + 2);
strcpy(res_str, str1);
- strcat(res_str, " ");
+ if (strlen(str1) != 0 && strlen(str2) != 0)
+ strcat(res_str, " ");
strcat(res_str, str2);
free(str1);
free(str2);