Re: Confusing terminology - Mailing list pgsql-hackers

From Mike Mascari
Subject Re: Confusing terminology
Date
Msg-id 3C49BE7E.56EB90CF@mascari.com
Whole thread Raw
In response to Re: Confusing terminology  ("Roderick A. Anderson" <raanders@tincan.org>)
List pgsql-hackers
"Roderick A. Anderson" wrote:
> 
> On Fri, 18 Jan 2002, Arguile wrote:
> 
> > Roderick A. Anderson writes:
> 
> > > > ERROR: Relation 'foo' already exists
> > >
> > > Can a table named foo and a view named foo exist in the same database?
> > >
> > No. There's no reasonable way for the server to know which you mean when you
> > execute a statement. This applies to tables, views, sequences, etc.
> 
> It was a rhetorical question (aka. smart-ass).  My point was a table,
> view, sequence, and their friends are all relations.  Or at least to my
> understanding the table and view are relations.
>    And therefore Relation 'foo' already exists makes sense to me.

CREATE INDEX i_foo1 on foo(key);

ERROR: DefineIndex: relation "foo" not found

ALTER TABLE foo ADD COLUMN key integer;

ERROR: ALTER TABLE: column name "key" already exists in table "foo"

TRUNCATE TABLE foo;

ERROR:  Relation 'foo' does not exist

Mike Mascari
mascarm@mascari.com


pgsql-hackers by date:

Previous
From: "Arguile"
Date:
Subject: Re: Confusing terminology
Next
From: Justin Clift
Date:
Subject: PostgreSQL 8.0 and cross-platform capabilities