From: Michael Meskes Date: Fri, 18 Aug 2006 16:00:49 +0000 (+0000) Subject: Applied the connect patch from HEAD X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=b8f0fc0508dc1944c3a08c07ea54385b581d9c50;p=users%2Fbernd%2Fpostgres.git Applied the connect patch from HEAD --- diff --git a/src/interfaces/ecpg/preproc/preproc.y b/src/interfaces/ecpg/preproc/preproc.y index e7cfefb362..9409133282 100644 --- a/src/interfaces/ecpg/preproc/preproc.y +++ b/src/interfaces/ecpg/preproc/preproc.y @@ -4356,7 +4356,11 @@ connection_target: database_name opt_server opt_port if (strlen($2) > 0 && *($2) != '@') mmerror(PARSE_ERROR, ET_ERROR, "Expected '@', found '%s'", $2); - $$ = make3_str(make_str("\""), make3_str($1, $2, $3), make_str("\"")); + /* C strings need to be handled differently */ + if ($1[0] == '\"') + $$ = $1; + else + $$ = make3_str(make_str("\""), make3_str($1, $2, $3), make_str("\"")); } | db_prefix ':' server opt_port '/' database_name opt_options { @@ -4374,13 +4378,6 @@ connection_target: database_name opt_server opt_port $$ = make3_str(make3_str(make_str("\""), $1, make_str(":")), $3, make3_str(make3_str($4, make_str("/"), $6), $7, make_str("\""))); } - | Sconst - { - if ($1[0] == '\"') - $$ = $1; - else - $$ = make3_str(make_str("\""), $1, make_str("\"")); - } | char_variable { $$ = $1;