Skip site navigation (1) Skip section navigation (2)

Re: What causes a table's oid to change?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Richard Ray <rray1(at)netdoor(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: What causes a table's oid to change?
Date: 2002-10-08 22:58:23
Message-ID: 200210081558.23893.josh@agliodbs.com (view raw or flat)
Thread:
Lists: pgsql-novice
Richard,

> I have a table with many views. I did something to cause the table to
> change oid. I don't know what I did. When I try to access the data using
> one of these views I get "ERROR:  Relation "documents" with OID 24389201 no
> longer exists". The table is fine. If I drop the view and recreate it it
> works fine. Can you tell me some of the common thing that would cause this?
> Can I "reset" the oid?

This is caused by dropping and re-creating the table.   Whenever you drop and 
re-created a table, all views based on the table must be dropped and 
re-created as well.   Someday, we'll fix this, but right now Postgres' 
performance optimizations depend on it.

-- 
Josh Berkus
josh(at)agliodbs(dot)com
Aglio Database Solutions
San Francisco

In response to

Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2002-10-09 05:10:52
Subject: Re: What causes a table's oid to change?
Previous:From: Josh BerkusDate: 2002-10-08 21:41:50
Subject: Re: Number Sequence Query

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group