1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-21 15:54:08 +03:00

Applied the connect patch from HEAD.

This commit is contained in:
Michael Meskes 2006-08-18 16:00:06 +00:00
parent 7ed55aac1c
commit 017d79b10d

View File

@ -1,4 +1,4 @@
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.311.2.3 2006/06/26 14:12:42 meskes Exp $ */ /* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.311.2.4 2006/08/18 16:00:06 meskes Exp $ */
/* Copyright comment */ /* Copyright comment */
%{ %{
@ -4495,6 +4495,10 @@ connection_target: database_name opt_server opt_port
if (strlen($2) > 0 && *($2) != '@') if (strlen($2) > 0 && *($2) != '@')
mmerror(PARSE_ERROR, ET_ERROR, "Expected '@', found '%s'", $2); mmerror(PARSE_ERROR, ET_ERROR, "Expected '@', found '%s'", $2);
/* C strings need to be handled differently */
if ($1[0] == '\"')
$$ = $1;
else
$$ = make3_str(make_str("\""), make3_str($1, $2, $3), make_str("\"")); $$ = make3_str(make_str("\""), make3_str($1, $2, $3), make_str("\""));
} }
| db_prefix ':' server opt_port '/' database_name opt_options | db_prefix ':' server opt_port '/' database_name opt_options
@ -4513,13 +4517,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("\""))); $$ = 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 | char_variable
{ {
$$ = $1; $$ = $1;