]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Applied the connect patch from HEAD
authorMichael Meskes <meskes@postgresql.org>
Fri, 18 Aug 2006 16:00:49 +0000 (16:00 +0000)
committerMichael Meskes <meskes@postgresql.org>
Fri, 18 Aug 2006 16:00:49 +0000 (16:00 +0000)
src/interfaces/ecpg/preproc/preproc.y

index 4abd062c8e3ed077246a0fecad27792638c1e4f7..167135d1fd2d355d0afb657fbcc511eed030632f 100644 (file)
@@ -1,4 +1,4 @@
-/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.303.4.6 2006/06/26 14:13:04 meskes Exp $ */
+/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.303.4.7 2006/08/18 16:00:49 meskes Exp $ */
 
 /* Copyright comment */
 %{
@@ -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;