mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Fix optimizer to not try to push WHERE clauses down into a sub-SELECT that
has a DISTINCT ON clause, per bug report from Anthony Wood. While at it, improve the DISTINCT-ON-clause recognizer routine to not be fooled by out- of-order DISTINCT lists.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: clauses.h,v 1.44 2001/05/20 20:28:20 tgl Exp $
|
||||
* $Id: clauses.h,v 1.45 2001/07/31 17:56:31 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -51,6 +51,8 @@ extern bool contain_noncachable_functions(Node *clause);
|
||||
extern bool is_pseudo_constant_clause(Node *clause);
|
||||
extern List *pull_constant_clauses(List *quals, List **constantQual);
|
||||
|
||||
extern bool has_distinct_on_clause(Query *query);
|
||||
|
||||
extern void clause_get_relids_vars(Node *clause, Relids *relids, List **vars);
|
||||
extern int NumRelids(Node *clause);
|
||||
extern void CommuteClause(Expr *clause);
|
||||
|
||||
Reference in New Issue
Block a user