~ubuntu-branches/ubuntu/trusty/postgresql-8.4/trusty

« back to all changes in this revision

Viewing changes to src/backend/executor/nodeIndexscan.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-11 16:59:35 UTC
  • mfrom: (5.1.1 karmic)
  • Revision ID: james.westby@ubuntu.com-20090711165935-jfwin6gfrxf0gfsi
Tags: 8.4.0-2
* debian/libpq-dev.install: Ship catalog/genbki.h. (Closes: #536139)
* debian/rules: Drop --enable-cassert for final release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 *
9
9
 *
10
10
 * IDENTIFICATION
11
 
 *        $PostgreSQL: pgsql/src/backend/executor/nodeIndexscan.c,v 1.131 2009/01/01 17:23:41 momjian Exp $
 
11
 *        $PostgreSQL: pgsql/src/backend/executor/nodeIndexscan.c,v 1.132 2009/06/11 14:48:57 momjian Exp $
12
12
 *
13
13
 *-------------------------------------------------------------------------
14
14
 */
367
367
        /*
368
368
         * Note we advance the rightmost array key most quickly, since it will
369
369
         * correspond to the lowest-order index column among the available
370
 
         * qualifications.  This is hypothesized to result in better locality
371
 
         * of access in the index.
 
370
         * qualifications.      This is hypothesized to result in better locality of
 
371
         * access in the index.
372
372
         */
373
373
        for (j = numArrayKeys - 1; j >= 0; j--)
374
374
        {
716
716
        extra_scan_keys = n_scan_keys;
717
717
 
718
718
        /*
719
 
         * for each opclause in the given qual, convert the opclause into
720
 
         * a single scan key
 
719
         * for each opclause in the given qual, convert the opclause into a single
 
720
         * scan key
721
721
         */
722
722
        j = 0;
723
723
        foreach(qual_cell, quals)
727
727
                Oid                     opno;           /* operator's OID */
728
728
                RegProcedure opfuncid;  /* operator proc id used in scan */
729
729
                Oid                     opfamily;       /* opfamily of index column */
730
 
                int                     op_strategy; /* operator's strategy number */
731
 
                Oid                     op_lefttype; /* operator's declared input types */
 
730
                int                     op_strategy;    /* operator's strategy number */
 
731
                Oid                     op_lefttype;    /* operator's declared input types */
732
732
                Oid                     op_righttype;
733
733
                Expr       *leftop;             /* expr on lhs of operator */
734
734
                Expr       *rightop;    /* expr on rhs ... */
805
805
                        ScanKeyEntryInitialize(this_scan_key,
806
806
                                                                   flags,
807
807
                                                                   varattno,    /* attribute number to scan */
808
 
                                                                   op_strategy, /* op's strategy */
809
 
                                                                   op_righttype, /* strategy subtype */
 
808
                                                                   op_strategy, /* op's strategy */
 
809
                                                                   op_righttype,                /* strategy subtype */
810
810
                                                                   opfuncid,    /* reg proc to use */
811
811
                                                                   scanvalue);  /* constant */
812
812
                }
983
983
                        ScanKeyEntryInitialize(this_scan_key,
984
984
                                                                   0,   /* flags */
985
985
                                                                   varattno,    /* attribute number to scan */
986
 
                                                                   op_strategy, /* op's strategy */
987
 
                                                                   op_righttype, /* strategy subtype */
 
986
                                                                   op_strategy, /* op's strategy */
 
987
                                                                   op_righttype,                /* strategy subtype */
988
988
                                                                   opfuncid,    /* reg proc to use */
989
989
                                                                   (Datum) 0);  /* constant */
990
990
                }
1015
1015
                        ScanKeyEntryInitialize(this_scan_key,
1016
1016
                                                                   SK_ISNULL | SK_SEARCHNULL,
1017
1017
                                                                   varattno,    /* attribute number to scan */
1018
 
                                                                   InvalidStrategy,     /* no strategy */
 
1018
                                                                   InvalidStrategy,             /* no strategy */
1019
1019
                                                                   InvalidOid,  /* no strategy subtype */
1020
1020
                                                                   InvalidOid,  /* no reg proc for this */
1021
1021
                                                                   (Datum) 0);  /* constant */