Re: relation vs table...

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Terrence Brannon <metaperl(at)urth(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: relation vs table...
Date: 2003-10-09 13:07:17
Message-ID: 20031009130716.GC17312@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Oct 09, 2003 at 05:50:48AM -0700, Terrence Brannon wrote:
> I don't know what Postgres considers a relation and had no intention of
> creating one when piping my schema to it... I always DROP TABLE before
> CREATE TABLE, so here are the ERRORS emitted when building the database:

Well, when you do a DROP TABLE and there's no table with the name you
give, the system is right in giving you a "table foo does not exist".
However, when you create a foreign key to a table that doesn't exist
(because you are creating it further down in your script), the system
doesn't know it is a table (it could be a view, for example). So it
falls back to using the more general term, "relation".

"Relation" means, in Postgres terms, "anything that can have a pg_class
entry". This means system tables and views, regular tables and views,
indexes, sequences, TOAST tables and special relations like pg_xactlock
if I'm not mistaken.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Estoy de acuerdo contigo en que la verdad absoluta no existe...
El problema es que la mentira sí existe y tu estás mintiendo" (G. Lama)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2003-10-09 13:20:46 Re: relation vs table...
Previous Message Gordon Luk 2003-10-09 13:04:59 Re: Does postgresql support HKSCS ?