Relation on longer exists error

Started by Francisco Reyesalmost 24 years ago4 messagesgeneral
Jump to latest
#1Francisco Reyes
lists@natserv.com

I have a script that I regularly run. Today when I ran it I got:
ERROR: Relation "ystats" with OID 715717097 no longer exists

I did drop/recreate that table today, but what would I be getting this
error?

#2Fran Fabrizio
ffabrizio@mmrd.com
In reply to: Francisco Reyes (#1)
Re: Relation on longer exists error

Francisco Reyes wrote:

I have a script that I regularly run. Today when I ran it I got:
ERROR: Relation "ystats" with OID 715717097 no longer exists

I did drop/recreate that table today, but what would I be getting this
error?

You answered your own question. You dropped the table and recreated it,
in the process it gets a new OID. Any functions/views/etc... declared
using that table are now looking for it at it's old OID "address". Drop
and recreate anything that was depending on that table.

-Fran

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Francisco Reyes (#1)
Re: Relation on longer exists error

Francisco Reyes <lists@natserv.com> writes:

I have a script that I regularly run. Today when I ran it I got:
ERROR: Relation "ystats" with OID 715717097 no longer exists
I did drop/recreate that table today, but what would I be getting this
error?

I think you broke a rule or view that referenced that table.

regards, tom lane

#4Francisco Reyes
lists@natserv.com
In reply to: Tom Lane (#3)
Re: Relation on longer exists error

On Mon, 6 May 2002, Tom Lane wrote:

Francisco Reyes <lists@natserv.com> writes:

I have a script that I regularly run. Today when I ran it I got:
ERROR: Relation "ystats" with OID 715717097 no longer exists
I did drop/recreate that table today, but what would I be getting this
error?

I think you broke a rule or view that referenced that table.
regards, tom lane

It was 4 views.
I had never used views until this weekend.
I was unaware that if one drops a table one needs to recreate it's views.
Good thing that I I keep all my table/view definitions in script files.