~ubuntu-branches/ubuntu/natty/postgresql-8.4/natty-security

« back to all changes in this revision

Viewing changes to src/backend/parser/parse_utilcmd.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:
19
19
 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
20
20
 * Portions Copyright (c) 1994, Regents of the University of California
21
21
 *
22
 
 *      $PostgreSQL: pgsql/src/backend/parser/parse_utilcmd.c,v 2.20 2009/01/01 17:23:46 momjian Exp $
 
22
 *      $PostgreSQL: pgsql/src/backend/parser/parse_utilcmd.c,v 2.21 2009/06/11 14:49:00 momjian Exp $
23
23
 *
24
24
 *-------------------------------------------------------------------------
25
25
 */
287
287
                }
288
288
 
289
289
                /*
290
 
                 * We have to reject "serial[]" explicitly, because once we've
291
 
                 * set typeid, LookupTypeName won't notice arrayBounds.  We don't
292
 
                 * need any special coding for serial(typmod) though.
 
290
                 * We have to reject "serial[]" explicitly, because once we've set
 
291
                 * typeid, LookupTypeName won't notice arrayBounds.  We don't need any
 
292
                 * special coding for serial(typmod) though.
293
293
                 */
294
294
                if (is_serial && column->typename->arrayBounds != NIL)
295
295
                        ereport(ERROR,
800
800
        index->idxname = NULL;
801
801
 
802
802
        /*
803
 
         * If the index is marked PRIMARY, it's certainly from a constraint;
804
 
         * else, if it's not marked UNIQUE, it certainly isn't; else, we have
805
 
         * to search pg_depend to see if there's an associated unique constraint.
 
803
         * If the index is marked PRIMARY, it's certainly from a constraint; else,
 
804
         * if it's not marked UNIQUE, it certainly isn't; else, we have to search
 
805
         * pg_depend to see if there's an associated unique constraint.
806
806
         */
807
807
        if (index->primary)
808
808
                index->isconstraint = true;
876
876
                if (amrec->amcanorder)
877
877
                {
878
878
                        /*
879
 
                         * If it supports sort ordering, copy DESC and NULLS opts.
880
 
                         * Don't set non-default settings unnecessarily, though,
881
 
                         * so as to improve the chance of recognizing equivalence
882
 
                         * to constraint indexes.
 
879
                         * If it supports sort ordering, copy DESC and NULLS opts. Don't
 
880
                         * set non-default settings unnecessarily, though, so as to
 
881
                         * improve the chance of recognizing equivalence to constraint
 
882
                         * indexes.
883
883
                         */
884
884
                        if (opt & INDOPTION_DESC)
885
885
                        {
1042
1042
                                strcmp(index->accessMethod, priorindex->accessMethod) == 0)
1043
1043
                        {
1044
1044
                                priorindex->unique |= index->unique;
 
1045
 
1045
1046
                                /*
1046
1047
                                 * If the prior index is as yet unnamed, and this one is
1047
1048
                                 * named, then transfer the name to the prior index. This
1475
1476
        if (pstate->p_hasWindowFuncs)
1476
1477
                ereport(ERROR,
1477
1478
                                (errcode(ERRCODE_WINDOWING_ERROR),
1478
 
                                 errmsg("cannot use window function in rule WHERE condition")));
 
1479
                          errmsg("cannot use window function in rule WHERE condition")));
1479
1480
 
1480
1481
        /*
1481
1482
         * 'instead nothing' rules with a qualification need a query rangetable so