Implicit RTEs - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Implicit RTEs
Date
Msg-id 389DA788.CA1CF761@alumni.caltech.edu
Whole thread Raw
List pgsql-hackers
I know this topic came up recently:

select t1.* from t1 ty;

gives a join between two instances of t1, rather than the expected
query rejection (the table in the from clause should be referred to as
"ty").

There was talk of disallowing:

select t1.*;

which seems to be a bit harsh, since it is a *nice* shorthand. How
about disallowing it if there is a FROM clause specified? That is,

select t1.*;

is allowed, but

select t1.* from t2;

is not? Pretty sure I can do this. Comments?
                    - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: [HACKERS] Advice needed,
Next
From: Karl DeBisschop
Date:
Subject: Re: [HACKERS] psql -e and -n flags