diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-01-08 19:41:40 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-01-08 19:41:40 +0000 |
| commit | cbca6c4896e4102a67988cbe1811afa9a45d8b5f (patch) | |
| tree | 7ca68b35642839051f8260b431ed1a5a99089f5a /src/include/access/relscan.h | |
| parent | 9270f1cdaa1588be39252b20d4a0c36be43c8580 (diff) | |
| download | postgresql-cbca6c4896e4102a67988cbe1811afa9a45d8b5f.tar.gz | |
Fix for bug #866. 7.3 contains new logic for avoiding redundant calls to
the index AM when we know we are fetching a unique row. However, this
logic did not consider the possibility that it would be asked to fetch
backwards. Also fix mark/restore to work correctly in this scenario.
Diffstat (limited to 'src/include/access/relscan.h')
| -rw-r--r-- | src/include/access/relscan.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/include/access/relscan.h b/src/include/access/relscan.h index 06b5701cf8..898afa64bb 100644 --- a/src/include/access/relscan.h +++ b/src/include/access/relscan.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: relscan.h,v 1.29 2002/09/04 20:31:37 momjian Exp $ + * $Id: relscan.h,v 1.30 2003/01/08 19:41:40 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -70,6 +70,15 @@ typedef struct IndexScanDescData FmgrInfo fn_getnext; /* cached lookup info for AM's getnext fn */ + /* + * If keys_are_unique and got_tuple are both true, we stop calling the + * index AM; it is then necessary for index_getnext to keep track of + * the logical scan position for itself. It does that using + * unique_tuple_pos: -1 = before row, 0 = on row, +1 = after row. + */ + int unique_tuple_pos; /* logical position */ + int unique_tuple_mark; /* logical marked position */ + PgStat_Info xs_pgstat_info; /* statistics collector hook */ } IndexScanDescData; |
