mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
pgindent run for 8.3.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.140 2007/05/04 01:13:44 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/optimizer/util/pathnode.c,v 1.141 2007/11/15 21:14:36 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -771,7 +771,7 @@ create_unique_path(PlannerInfo *root, RelOptInfo *rel, Path *subpath)
|
||||
/*
|
||||
* Try to identify the targetlist that will actually be unique-ified. In
|
||||
* current usage, this routine is only used for sub-selects of IN clauses,
|
||||
* so we should be able to find the tlist in in_info_list. Get the IN
|
||||
* so we should be able to find the tlist in in_info_list. Get the IN
|
||||
* clause's operators, too, because they determine what "unique" means.
|
||||
*/
|
||||
sub_targetlist = NIL;
|
||||
@ -931,7 +931,7 @@ translate_sub_tlist(List *tlist, int relid)
|
||||
*
|
||||
* colnos is an integer list of output column numbers (resno's). We are
|
||||
* interested in whether rows consisting of just these columns are certain
|
||||
* to be distinct. "Distinctness" is defined according to whether the
|
||||
* to be distinct. "Distinctness" is defined according to whether the
|
||||
* corresponding upper-level equality operators listed in opids would think
|
||||
* the values are distinct. (Note: the opids entries could be cross-type
|
||||
* operators, and thus not exactly the equality operators that the subquery
|
||||
@ -948,8 +948,8 @@ query_is_distinct_for(Query *query, List *colnos, List *opids)
|
||||
|
||||
/*
|
||||
* DISTINCT (including DISTINCT ON) guarantees uniqueness if all the
|
||||
* columns in the DISTINCT clause appear in colnos and operator
|
||||
* semantics match.
|
||||
* columns in the DISTINCT clause appear in colnos and operator semantics
|
||||
* match.
|
||||
*/
|
||||
if (query->distinctClause)
|
||||
{
|
||||
@ -1004,9 +1004,8 @@ query_is_distinct_for(Query *query, List *colnos, List *opids)
|
||||
*
|
||||
* XXX this code knows that prepunion.c will adopt the default ordering
|
||||
* operator for each column datatype as the sortop. It'd probably be
|
||||
* better if these operators were chosen at parse time and stored into
|
||||
* the parsetree, instead of leaving bits of the planner to decide
|
||||
* semantics.
|
||||
* better if these operators were chosen at parse time and stored into the
|
||||
* parsetree, instead of leaving bits of the planner to decide semantics.
|
||||
*/
|
||||
if (query->setOperations)
|
||||
{
|
||||
@ -1028,7 +1027,7 @@ query_is_distinct_for(Query *query, List *colnos, List *opids)
|
||||
opid = distinct_col_search(tle->resno, colnos, opids);
|
||||
if (!OidIsValid(opid) ||
|
||||
!ops_in_same_btree_opfamily(opid,
|
||||
ordering_oper_opid(exprType((Node *) tle->expr))))
|
||||
ordering_oper_opid(exprType((Node *) tle->expr))))
|
||||
break; /* exit early if no match */
|
||||
}
|
||||
if (l == NULL) /* had matches for all? */
|
||||
@ -1048,7 +1047,7 @@ query_is_distinct_for(Query *query, List *colnos, List *opids)
|
||||
* distinct_col_search - subroutine for query_is_distinct_for
|
||||
*
|
||||
* If colno is in colnos, return the corresponding element of opids,
|
||||
* else return InvalidOid. (We expect colnos does not contain duplicates,
|
||||
* else return InvalidOid. (We expect colnos does not contain duplicates,
|
||||
* so the result is well-defined.)
|
||||
*/
|
||||
static Oid
|
||||
|
Reference in New Issue
Block a user