mirror of
https://github.com/postgres/postgres.git
synced 2025-08-28 18:48:04 +03:00
Support ORDER BY ... NULLS FIRST/LAST, and add ASC/DESC/NULLS FIRST/NULLS LAST
per-column options for btree indexes. The planner's support for this is still pretty rudimentary; it does not yet know how to plan mergejoins with nondefault ordering options. The documentation is pretty rudimentary, too. I'll work on improving that stuff later. Note incompatible change from prior behavior: ORDER BY ... USING will now be rejected if the operator is not a less-than or greater-than member of some btree opclass. This prevents less-than-sane behavior if an operator that doesn't actually define a proper sort ordering is selected.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/utils/lsyscache.h,v 1.110 2007/01/05 22:19:59 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/include/utils/lsyscache.h,v 1.111 2007/01/09 02:14:16 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -37,6 +37,7 @@ extern Oid get_opfamily_member(Oid opfamily, Oid lefttype, Oid righttype,
|
||||
int16 strategy);
|
||||
extern bool get_op_mergejoin_info(Oid eq_op, Oid *left_sortop,
|
||||
Oid *right_sortop, Oid *opfamily);
|
||||
extern bool get_op_compare_function(Oid opno, Oid *cmpfunc, bool *reverse);
|
||||
extern Oid get_op_hash_function(Oid opno);
|
||||
extern void get_op_btree_interpretation(Oid opno,
|
||||
List **opfamilies, List **opstrats);
|
||||
|
Reference in New Issue
Block a user