|
3 | 3 | * out of its tuple
|
4 | 4 | *
|
5 | 5 | * IDENTIFICATION
|
6 |
| - * $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.45 2000/03/14 23:06:37 thomas Exp $ |
| 6 | + * $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.46 2000/03/15 23:42:14 tgl Exp $ |
7 | 7 | *
|
8 | 8 | * This software is copyrighted by Jan Wieck - Hamburg.
|
9 | 9 | *
|
@@ -998,18 +998,9 @@ get_select_query_def(Query *query, deparse_context *context)
|
998 | 998 | inherit_marker(rte));
|
999 | 999 | /*
|
1000 | 1000 | * NOTE: SQL92 says you can't write column aliases unless
|
1001 |
| - * you write a table alias --- but the table alias could |
1002 |
| - * be spelled the same as the table's real name. This |
1003 |
| - * logic is therefore all wet: it should go something like |
1004 |
| - * IF we-need-to-dump-column-aliases OR relname != refname |
1005 |
| - * THEN print refname; |
1006 |
| - * IF we-need-to-dump-column-aliases |
1007 |
| - * THEN print column alias list. |
1008 |
| - * But currently we can't tell whether we need to dump |
1009 |
| - * column aliases or not... without that, this clearly |
1010 |
| - * backwards logic seems the best short-term approach. |
1011 |
| - * Since we don't really support SQL joins yet, dropping |
1012 |
| - * the list of column aliases doesn't hurt anything... |
| 1001 | + * you write a table alias --- so, if there's an alias list, |
| 1002 | + * make sure we emit a table alias even if it's the same as |
| 1003 | + * the table's real name. |
1013 | 1004 | */
|
1014 | 1005 | if ((rte->ref!=NULL)
|
1015 | 1006 | && ((strcmp(rte->relname,rte->ref->relname)!=0)
|
|