mirror of
https://github.com/postgres/postgres.git
synced 2025-10-15 05:46:52 +03:00
There are some bugs about backward scanning using
indexes. 1. Index Scan using plural indexids never scan backward as to the order of indexids. 2. The cursor using Index scan is not usable after moving past the end. This patch solves above bugs. Moreover the change of _bt_first() would be useful to extend ORDER BY patch by Jan Wieck for all descending order cases. Hiroshi Inoue
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.25 1999/02/13 23:14:37 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.26 1999/04/13 17:18:29 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -367,8 +367,14 @@ _bt_checkkeys(IndexScanDesc scan, IndexTuple tuple, Size *keysok)
|
||||
&isNull);
|
||||
|
||||
/* btree doesn't support 'A is null' clauses, yet */
|
||||
if (isNull || key[0].sk_flags & SK_ISNULL)
|
||||
if (key[0].sk_flags & SK_ISNULL)
|
||||
return false;
|
||||
if (isNull)
|
||||
{
|
||||
if (*keysok < so->numberOfFirstKeys)
|
||||
*keysok = -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (key[0].sk_flags & SK_COMMUTE)
|
||||
{
|
||||
|
Reference in New Issue
Block a user