Re: Aliased table names ...oddity? - Mailing list pgsql-novice

From Michael Glaesemann
Subject Re: Aliased table names ...oddity?
Date
Msg-id D275E83A-6C09-4B7F-B954-095ACBC79EF4@myrealbox.com
Whole thread Raw
In response to Aliased table names ...oddity?  (Steve Tucknott <steve@retsol.co.uk>)
Responses Re: Aliased table names ...oddity?
List pgsql-novice
On Jun 30, 2005, at 3:54 PM, Steve Tucknott wrote:

> PostgreSQL-7.4.5

<snip />

> Running the SQL in PSQL, it seems that a FROM clause is
> automatically appended for the missing 'markUp' table - so it does
> seem
> that this is intentional. Is there a way to have this 'rejected' as an
> error - ie selecting from a table not included in the query?

Yes, there is/was designed behavior, and there is a way to shut it
off in postgresql.conf. It's still there for backwards compatibility,
but more recent versions display a notice when a FROM clause is added.

test=# select foo.foo_id, bar_name from foo f join bar using (foo_id);
NOTICE:  adding missing FROM-clause entry for table "foo"

Here are some references:
http://www.postgresql.org/docs/7.4/interactive/runtime-config.html
http://sql-info.de/postgresql/postgres-gotchas.html#1_5

Hope this helps.

Michael Glaesemann
grzm myrealbox com



pgsql-novice by date:

Previous
From: Steve Tucknott
Date:
Subject: Aliased table names ...oddity?
Next
From: Steve Tucknott
Date:
Subject: Re: Aliased table names ...oddity?