~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to src/backend/optimizer/util/plancat.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-06-14 09:53:29 UTC
  • mto: (6.1.1 sid) (10.1.1 oneiric-proposed) (1.2.1)
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20110614095329-71gfhjywyp2c27au
Tags: upstream-9.1~beta2
ImportĀ upstreamĀ versionĀ 9.1~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
         */
91
91
        relation = heap_open(relationObjectId, NoLock);
92
92
 
 
93
        /* Temporary and unlogged relations are inaccessible during recovery. */
 
94
        if (!RelationNeedsWAL(relation) && RecoveryInProgress())
 
95
                ereport(ERROR,
 
96
                                (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
 
97
                                 errmsg("cannot access temporary or unlogged relations during recovery")));
 
98
 
93
99
        rel->min_attr = FirstLowInvalidHeapAttributeNumber + 1;
94
100
        rel->max_attr = RelationGetNumberOfAttributes(relation);
95
101
        rel->reltablespace = RelationGetForm(relation)->reltablespace;