Thread: Help in finding the error
I'm trying to insert data into an empty table but I keep getting the error:
ERROR: could not open relation with OID 42939
I have a couple of constraints on the table but what I'm entering doesn't violate those. Can someone tell me where in the system catalog I can look to find what relation it is talking about?
TIA,
Duane
Duane Lee - EGOVX <DLee@mail.maricopa.gov> writes: > I'm trying to insert data into an empty table but I keep getting the error: > ERROR: could not open relation with OID 42939 More detail please? For starters, what PG version is this? > I have a couple of constraints on the table but what I'm entering doesn't > violate those. My crudest guesses would involve rules not constraints (specifically, a rule that references a no-longer-extant table). regards, tom lane
I'm on 7.4.2. I did some more testing and ended up dropping and recreating the table with all the constraints, etc. in the definition and tried my inserts, INSERT...SELECT..., and it worked just fine. I probably had something else set that I didn't want set that was causing my problems. But still, I would like to know where I might go in the catalog to find the info about "relation with OID xxxx".
For the most part I'll chalk up my problem to my lack of experience with Postgres. All in all I'm impressed with what it can do having come from a DB2 on the mainframe background.
Thanks,
Duane
-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Tuesday, June 08, 2004 10:32 PM
To: Duane Lee - EGOVX
Cc: PG General (E-mail); PGADMIN (E-mail)
Subject: Re: [GENERAL] Help in finding the error
Duane Lee - EGOVX <DLee@mail.maricopa.gov> writes:
> I'm trying to insert data into an empty table but I keep getting the error:
> ERROR: could not open relation with OID 42939
More detail please? For starters, what PG version is this?
> I have a couple of constraints on the table but what I'm entering doesn't
> violate those.
My crudest guesses would involve rules not constraints (specifically,
a rule that references a no-longer-extant table).
regards, tom lane