Relation "pg_relcheck" - Mailing list pgsql-sql

From Victor Yegorov
Subject Relation "pg_relcheck"
Date
Msg-id 20030225155021.GA4347@pirmabanka.lv
Whole thread Raw
Responses Re: Relation "pg_relcheck"  ("Victor Yegorov" <viy@pirmabanka.lv>)
Re: Relation "pg_relcheck"  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Re: Relation "pg_relcheck"  (Ian Barwick <barwick@gmx.net>)
Re: Relation "pg_relcheck"  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Relation "pg_relcheck"  (Rod Taylor <rbt@rbt.ca>)
List pgsql-sql
Hello.

I'm running PostgreSQL 7.3.2 on i686-pc-linux-gnu, compiled by GCC 2.95.3.

I've created a table (a forest of nested sets):
create table forest ( tree_id int4 not null,leaf_id int4 not null,lid int2 not null check(lid > 0),rid int2 not null
check(rid > 1),relation_id int2 not null default 0,constraint forest_order check(lid < rid),constraint forest_primary
primarykey(tree_id, leaf_id)
 
);

Now, in psql:
mema2=> \d forest
ERROR:  Relation "pg_relcheck" does not exist

Whats the problem, I wonder. I've already created a new DB location with
initdb and pointed server to it - same stuff.




psql -E gives the following:

mema2=> \d forest
********* QUERY **********
SELECT relhasindex, relkind, relchecks, reltriggers, relhasrules
FROM pg_class WHERE relname='forest'
**************************

********* QUERY **********
SELECT a.attname, format_type(a.atttypid, a.atttypmod), a.attnotnull,
a.atthasdef, a.attnum
FROM pg_class c, pg_attribute a
WHERE c.relname = 'forest'
AND a.attnum > 0 AND a.attrelid = c.oid
ORDER BY a.attnum
************************** 
********* QUERY **********
SELECT substring(d.adsrc for 128) FROM pg_attrdef d, pg_class c
WHERE c.relname = 'forest' AND c.oid = d.adrelid AND d.adnum = 5
************************** 
********* QUERY **********
SELECT c2.relname
FROM pg_class c, pg_class c2, pg_index i
WHERE c.relname = 'forest' AND c.oid = i.indrelid AND i.indexrelid =
c2.oid
AND NOT i.indisunique ORDER BY c2.relname
**************************

********* QUERY **********
SELECT c2.relname
FROM pg_class c, pg_class c2, pg_index i
WHERE c.relname = 'forest' AND c.oid = i.indrelid AND i.indexrelid = c2.oid
AND i.indisprimary AND i.indisunique ORDER BY c2.relname
**************************

********* QUERY **********
SELECT c2.relname
FROM pg_class c, pg_class c2, pg_index i
WHERE c.relname = 'forest' AND c.oid = i.indrelid AND i.indexrelid = c2.oid
AND NOT i.indisprimary AND i.indisunique ORDER BY c2.relname
**************************

********* QUERY **********
SELECT rcsrc, rcname
FROM pg_relcheck r, pg_class c
WHERE c.relname='forest' AND c.oid = r.rcrelid
**************************

ERROR:  Relation "pg_relcheck" does not exist
mema2=>


Hope to hear from you.

-- 

Victor Yegorov


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: STORAGE and GiST
Next
From: Stephan Szabo
Date:
Subject: Re: Sub Select inside Check ?