|
7 | 7 | *
|
8 | 8 | *
|
9 | 9 | * IDENTIFICATION
|
10 |
| - * $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.24 1998/08/25 03:22:49 momjian Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.25 1998/08/26 03:17:32 momjian Exp $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -575,28 +575,30 @@ printf("transformTargetList: decode T_Ident\n");
|
575 | 575 | lnext(tail_p_target) = ExpandAllTables(pstate);
|
576 | 576 | expand_star = true;
|
577 | 577 | }
|
578 |
| - |
579 |
| - /* |
580 |
| - * Target item is relation.*, expand the table (eg. |
581 |
| - * SELECT emp.*, dname FROM emp, dept) |
582 |
| - */ |
583 |
| - attrname = strVal(lfirst(att->attrs)); |
584 |
| - if (att->attrs != NIL && !strcmp(attrname, "*")) |
| 578 | + else |
585 | 579 | {
|
586 |
| - |
587 | 580 | /*
|
588 |
| - * tail_p_target is the target list we're building |
589 |
| - * in the while loop. Make sure we fix it after |
590 |
| - * appending more nodes. |
| 581 | + * Target item is relation.*, expand the table (eg. |
| 582 | + * SELECT emp.*, dname FROM emp, dept) |
591 | 583 | */
|
592 |
| - if (tail_p_target == NIL) |
593 |
| - p_target = tail_p_target = expandAll(pstate, att->relname, |
594 |
| - att->relname, &pstate->p_last_resno); |
595 |
| - else |
596 |
| - lnext(tail_p_target) = |
597 |
| - expandAll(pstate, att->relname, att->relname, |
598 |
| - &pstate->p_last_resno); |
599 |
| - expand_star = true; |
| 584 | + attrname = strVal(lfirst(att->attrs)); |
| 585 | + if (att->attrs != NIL && !strcmp(attrname, "*")) |
| 586 | + { |
| 587 | + |
| 588 | + /* |
| 589 | + * tail_p_target is the target list we're building |
| 590 | + * in the while loop. Make sure we fix it after |
| 591 | + * appending more nodes. |
| 592 | + */ |
| 593 | + if (tail_p_target == NIL) |
| 594 | + p_target = tail_p_target = expandAll(pstate, att->relname, |
| 595 | + att->relname, &pstate->p_last_resno); |
| 596 | + else |
| 597 | + lnext(tail_p_target) = |
| 598 | + expandAll(pstate, att->relname, att->relname, |
| 599 | + &pstate->p_last_resno); |
| 600 | + expand_star = true; |
| 601 | + } |
600 | 602 | }
|
601 | 603 | if (expand_star)
|
602 | 604 | {
|
|
0 commit comments