pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Relation "pg_relcheck"
9+ messages / 7 participants
[nested] [flat]

* Relation "pg_relcheck"
@ 2003-02-25 15:50  Victor Yegorov <viy@pirmabanka.lv>
  0 siblings, 5 replies; 9+ messages in thread

From: Victor Yegorov @ 2003-02-25 15:50 UTC (permalink / raw)
  To: 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 primary key(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



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Relation "pg_relcheck"
@ 2003-02-25 16:08  Victor Yegorov <viy@pirmabanka.lv>
  parent: Victor Yegorov <viy@pirmabanka.lv>
  4 siblings, 0 replies; 9+ messages in thread

From: Victor Yegorov @ 2003-02-25 16:08 UTC (permalink / raw)
  To: pgsql-sql

* Victor Yegorov <viy@pirmabanka.lv> [25.02.2003 18:06]:
> 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 primary key(tree_id, leaf_id)
> );
> 

Sorry for troubles, got the problem myself.
psql client was of version 7.2.2.
After update everything works fine.

-- 

Victor Yegorov



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Relation "pg_relcheck"
@ 2003-02-25 16:11  Stephan Szabo <sszabo@megazone23.bigpanda.com>
  parent: Victor Yegorov <viy@pirmabanka.lv>
  4 siblings, 0 replies; 9+ messages in thread

From: Stephan Szabo @ 2003-02-25 16:11 UTC (permalink / raw)
  To: Victor Yegorov <viy@pirmabanka.lv>; +Cc: pgsql-sql


On Tue, 25 Feb 2003, Victor Yegorov wrote:

> 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 primary key(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.

Are you sure you're using the same version of psql as the server is
running?  The info in pg_relcheck moved to pg_constraint IIRC.




^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Relation "pg_relcheck"
@ 2003-02-25 16:22  Ian Barwick <barwick@gmx.net>
  parent: Victor Yegorov <viy@pirmabanka.lv>
  4 siblings, 0 replies; 9+ messages in thread

From: Ian Barwick @ 2003-02-25 16:22 UTC (permalink / raw)
  To: Victor Yegorov <viy@pirmabanka.lv>; pgsql-sql

On Tuesday 25 February 2003 16:50, Victor Yegorov wrote:
> 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 primary key(tree_id, leaf_id)
> );
>
> Now, in psql:
> mema2=> \d forest
> ERROR:  Relation "pg_relcheck" does not exist

You are probably using a pre-7.3 version of psql with a 7.3.x
backend.

Ian Barwick
barwick@gmx.net



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Relation "pg_relcheck"
@ 2003-02-25 16:24  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Victor Yegorov <viy@pirmabanka.lv>
  4 siblings, 1 reply; 9+ messages in thread

From: Tom Lane @ 2003-02-25 16:24 UTC (permalink / raw)
  To: Victor Yegorov <viy@pirmabanka.lv>; +Cc: pgsql-sql

"Victor Yegorov" <viy@pirmabanka.lv> writes:
> mema2=> \d forest
> ERROR:  Relation "pg_relcheck" does not exist

> Whats the problem, I wonder.

psql version not matching server version.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Relation "pg_relcheck"
@ 2003-02-25 16:34  Rod Taylor <rbt@rbt.ca>
  parent: Victor Yegorov <viy@pirmabanka.lv>
  4 siblings, 0 replies; 9+ messages in thread

From: Rod Taylor @ 2003-02-25 16:34 UTC (permalink / raw)
  To: Victor Yegorov <viy@pirmabanka.lv>; +Cc: pgsql-sql

On Tue, 2003-02-25 at 10:50, Victor Yegorov wrote:
> Hello.
> 
> I'm running PostgreSQL 7.3.2 on i686-pc-linux-gnu, compiled by GCC 2.95.3.

The backend has been updated, but you're using an old version of the
psql client.

-- 
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

Attachments:

  signature.asc (application/pgp-signature, 186B) download

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Relation "pg_relcheck"
@ 2003-02-26 20:40  Tilo Schwarz <mail@tilo-schwarz.de>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 9+ messages in thread

From: Tilo Schwarz @ 2003-02-26 20:40 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql

Tom Lane writes:
> "Victor Yegorov" <viy@pirmabanka.lv> writes:
> > mema2=> \d forest
> > ERROR:  Relation "pg_relcheck" does not exist
> >
> > Whats the problem, I wonder.
>
> psql version not matching server version.
>
> 			regards, tom lane

Because this sort of questions appears quite often, I was wondering, if the 
start up message of psql could be changed from 


Welcome to psql 7.4devel, the PostgreSQL interactive terminal.


to something like


Welcome to psql 7.4devel, the PostgreSQL interactive terminal.
Connected to PostgreSQL <put version here>.


to make it easier to catch these errors. Don't I get the server version with 
"select version();"? (I would even try my first patch if folks would like 
it...)

Best regards,

	Tilo



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Relation "pg_relcheck"
@ 2003-02-26 21:09  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Tilo Schwarz <mail@tilo-schwarz.de>
  0 siblings, 1 reply; 9+ messages in thread

From: Tom Lane @ 2003-02-26 21:09 UTC (permalink / raw)
  To: Tilo Schwarz <mail@tilo-schwarz.de>; +Cc: pgsql-sql

Tilo Schwarz <mail@tilo-schwarz.de> writes:
> Because this sort of questions appears quite often, I was wondering, if the 
> start up message of psql could be changed from 
>   Welcome to psql 7.4devel, the PostgreSQL interactive terminal.
> to something like
>   Welcome to psql 7.4devel, the PostgreSQL interactive terminal.
>   Connected to PostgreSQL <put version here>.
> to make it easier to catch these errors.

I'm not eager to add yet another hidden query cycle to the connection
startup overhead, especially not one that does nothing for people who
aren't making mistakes ;-).  What's been in the back of my mind is that
when we redesign the FE/BE protocol (real soon now, I hope) we should
extend the backend's first message to the frontend to include its
version number, as well as any other useful info we can think of
(database encoding and default client encoding come to mind).  This
would make it quite inexpensive to add the backend version to psql's
banner, as well as be a net savings in startup time now that libpq only
comes in a multibyte-enabled version.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Relation "pg_relcheck"
@ 2003-03-06 19:53  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 9+ messages in thread

From: Bruce Momjian @ 2003-03-06 19:53 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Tilo Schwarz <mail@tilo-schwarz.de>; pgsql-sql

Tom Lane wrote:
> Tilo Schwarz <mail@tilo-schwarz.de> writes:
> > Because this sort of questions appears quite often, I was wondering, if the 
> > start up message of psql could be changed from 
> >   Welcome to psql 7.4devel, the PostgreSQL interactive terminal.
> > to something like
> >   Welcome to psql 7.4devel, the PostgreSQL interactive terminal.
> >   Connected to PostgreSQL <put version here>.
> > to make it easier to catch these errors.
> 
> I'm not eager to add yet another hidden query cycle to the connection
> startup overhead, especially not one that does nothing for people who
> aren't making mistakes ;-).  What's been in the back of my mind is that
> when we redesign the FE/BE protocol (real soon now, I hope) we should
> extend the backend's first message to the frontend to include its
> version number, as well as any other useful info we can think of
> (database encoding and default client encoding come to mind).  This

Added to TODO:

>       o Report server version number, database encoding, client encoding

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



^ permalink  raw  reply  [nested|flat] 9+ messages in thread


end of thread, other threads:[~2003-03-06 19:53 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-02-25 15:50 Relation "pg_relcheck" Victor Yegorov <viy@pirmabanka.lv>
2003-02-25 16:08 ` Victor Yegorov <viy@pirmabanka.lv>
2003-02-25 16:11 ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2003-02-25 16:22 ` Ian Barwick <barwick@gmx.net>
2003-02-25 16:24 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-02-26 20:40   ` Tilo Schwarz <mail@tilo-schwarz.de>
2003-02-26 21:09     ` Tom Lane <tgl@sss.pgh.pa.us>
2003-03-06 19:53       ` Bruce Momjian <pgman@candle.pha.pa.us>
2003-02-25 16:34 ` Rod Taylor <rbt@rbt.ca>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox