|
1 |
| -/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.301 2004/11/10 13:48:10 meskes Exp $ */ |
| 1 | +/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/preproc.y,v 1.302 2004/12/06 20:35:35 meskes Exp $ */ |
2 | 2 |
|
3 | 3 | /* Copyright comment */
|
4 | 4 | %{
|
@@ -208,16 +208,16 @@ static char *
|
208 | 208 | adjust_informix(struct arguments *list)
|
209 | 209 | {
|
210 | 210 | /* Informix accepts DECLARE with variables that are out of scope when OPEN is called.
|
211 |
| - * for instance you can declare variables in a function, and then subsequently use them |
212 |
| - * { |
213 |
| - * declare_vars(); |
214 |
| - * exec sql ... which uses vars declared in the above function |
215 |
| - * |
| 211 | + * for instance you can declare variables in a function, and then subsequently use them |
| 212 | + * { |
| 213 | + * declare_vars(); |
| 214 | + * exec sql ... which uses vars declared in the above function |
| 215 | + * |
216 | 216 | * This breaks standard and leads to some very dangerous programming.
|
217 | 217 | * Since they do, we have to work around and accept their syntax as well.
|
218 | 218 | * But we will do so ONLY in Informix mode.
|
219 | 219 | * We have to change the variables to our own struct and just store the pointer instead of the variable
|
220 |
| - */ |
| 220 | + */ |
221 | 221 |
|
222 | 222 | struct arguments *ptr;
|
223 | 223 | char *result = make_str("");
|
@@ -1955,12 +1955,8 @@ any_name: ColId { $$ = $1; }
|
1955 | 1955 | | ColId attrs { $$ = cat2_str($1, $2); }
|
1956 | 1956 | ;
|
1957 | 1957 |
|
1958 |
| -/* |
1959 |
| - * The slightly convoluted way of writing this production avoids reduce/reduce |
1960 |
| - * errors against indirection_el. |
1961 |
| - */ |
1962 | 1958 | attrs: '.' attr_name { $$ = cat2_str(make_str("."), $2); }
|
1963 |
| - | '.' attr_name attrs { $$ = cat_str(3, make_str("."), $2, $3); } |
| 1959 | + | attrs '.' attr_name { $$ = cat_str(3, $1, make_str("."), $3); } |
1964 | 1960 | ;
|
1965 | 1961 |
|
1966 | 1962 | /*****************************************************************************
|
@@ -4167,7 +4163,7 @@ qualified_name_list: qualified_name
|
4167 | 4163 |
|
4168 | 4164 | qualified_name: relation_name
|
4169 | 4165 | { $$ = $1; }
|
4170 |
| - | relation_name attrs |
| 4166 | + | relation_name indirection |
4171 | 4167 | { $$ = cat2_str($1, $2); }
|
4172 | 4168 | ;
|
4173 | 4169 |
|
|
0 commit comments