diff options
Diffstat (limited to 'src/interfaces/ecpg/preproc')
-rw-r--r-- | src/interfaces/ecpg/preproc/ecpg.addons | 6 | ||||
-rw-r--r-- | src/interfaces/ecpg/preproc/ecpg.header | 5 |
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); |