mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
Fix for count(*), aggs with views and multiple tables and sum(3).
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.3 1997/11/26 03:42:49 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.4 1998/01/04 04:31:22 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -255,7 +255,7 @@ transformTargetList(ParseState *pstate, List *targetlist)
|
||||
* Target item is fully specified: ie.
|
||||
* relation.attribute
|
||||
*/
|
||||
result = handleNestedDots(pstate, att, &pstate->p_last_resno);
|
||||
result = handleNestedDots(pstate, att, &pstate->p_last_resno,EXPR_COLUMN_FIRST);
|
||||
handleTargetColname(pstate, &res->name, att->relname, attrname);
|
||||
if (att->indirection != NIL)
|
||||
{
|
||||
@ -467,7 +467,8 @@ make_targetlist_expr(ParseState *pstate,
|
||||
att->relname = pstrdup(RelationGetRelationName(rd)->data);
|
||||
att->attrs = lcons(makeString(colname), NIL);
|
||||
target_expr = (Expr *) handleNestedDots(pstate, att,
|
||||
&pstate->p_last_resno);
|
||||
&pstate->p_last_resno,
|
||||
EXPR_COLUMN_FIRST);
|
||||
while (ar != NIL)
|
||||
{
|
||||
A_Indices *ind = lfirst(ar);
|
||||
|
Reference in New Issue
Block a user