[GENERAL] postgres catalog files problem

2007-09-17 Thread Josh Harrison
Hi, I noticed that I have too many records in my pg_ catalog files with the same name. For example if I give this query, which checks for the triggers that do not have corresponding tables in the pg_class select * from pg_trigger where tgrelid not in (select relfilenode from pg_class), I get

Re: [GENERAL] postgres catalog files problem

2007-09-17 Thread Tom Lane
Josh Harrison [EMAIL PROTECTED] writes: if I give this query, which checks for the triggers that do not have corresponding tables in the pg_class select * from pg_trigger where tgrelid not in (select relfilenode from pg_class), This query is wrong --- relfilenode is not a join column for any

Re: [GENERAL] postgres catalog files problem

2007-09-17 Thread Josh Harrison
Thanks Tom. I tried it using pg_class.oid and I still have some records which r not in the pg_class files. What can I do about that? (BTW what does relfilenode in pg_class stands for?) Thanks again Josh On 9/17/07, Tom Lane [EMAIL PROTECTED] wrote: Josh Harrison [EMAIL PROTECTED] writes: if I

Re: [GENERAL] postgres catalog files problem

2007-09-17 Thread Erik Jones
On Sep 17, 2007, at 9:02 AM, Josh Harrison wrote: On 9/17/07, Tom Lane [EMAIL PROTECTED] wrote: Josh Harrison [EMAIL PROTECTED] writes: if I give this query, which checks for the triggers that do not have corresponding tables in the pg_class select * from pg_trigger where tgrelid not in

Re: [GENERAL] postgres catalog files problem

2007-09-17 Thread Josh Harrison
Thanks Eric, ll try to explain as much as possible When i try to give this query UPDATE payment SET desc='New description' WHERE payment_id='xyz' I got the error ERROR: could not open relation with OID 672178 This error was consistent for this query and it yielded the same OID every time.

Re: [GENERAL] postgres catalog files problem

2007-09-17 Thread Tom Lane
Josh Harrison [EMAIL PROTECTED] writes: Yes...there is a relation in pg_class with the name 'payment' but its oid is not 672178. So why is it giving me could not open relation with OID 672178 when i try an update statement ? Well, are there any other relations that the UPDATE might need to

Re: [GENERAL] postgres catalog files problem

2007-09-17 Thread Erik Jones
On Sep 17, 2007, at 11:57 AM, Josh Harrison wrote: On 9/17/07, Tom Lane [EMAIL PROTECTED] wrote: Josh Harrison [EMAIL PROTECTED] writes: When i try to give this query UPDATE payment SET desc='New description' WHERE payment_id='xyz' I got the error ERROR: could not open relation with

Re: [GENERAL] postgres catalog files problem

2007-09-17 Thread Erik Jones
On Sep 17, 2007, at 12:31 PM, Josh Harrison wrote: Thanks. Actually Im currently testing oracle to postgres migration with a small dataset. I haven't started working with the real dataset. I wanted to check with a small dataset before I start with the big one. I know the records that I

Re: [GENERAL] postgres catalog files problem

2007-09-17 Thread Josh Harrison
Hi, Yes...there is a relation in pg_class with the name 'payment' but its oid is not 672178. So why is it giving me could not open relation with OID 672178 when i try an update statement ? I use version 8.2. I think the problem started when i manually deleted some rows from the pg_class catalog

Re: [GENERAL] postgres catalog files problem

2007-09-17 Thread Tom Lane
Josh Harrison [EMAIL PROTECTED] writes: When i try to give this query UPDATE payment SET desc='New description' WHERE payment_id='xyz' I got the error ERROR: could not open relation with OID 672178 Hmm, there apparently *is* a pg_class row for relation 'payment', else you'd not get this

Re: [GENERAL] postgres catalog files problem

2007-09-17 Thread Josh Harrison
Thanks. Actually Im currently testing oracle to postgres migration with a small dataset. I haven't started working with the real dataset. I wanted to check with a small dataset before I start with the big one. I know the records that I deleted from the pg_class file. so what do i do next? Will it