From: | Leif K-Brooks <eurleif(at)ecritters(dot)biz> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Automatic joins? |
Date: | 2004-01-18 00:06:52 |
Message-ID: | 4009CE1C.5050401@ecritters.biz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I tried posting this before, but I don't think it got posted. Sorry if
it did.
According to the Wikipedia article on PostgreSQL
(http://en.wikipedia.org/wiki/PostgreSQL) it has a feature for
automatic joins:
"SELECT u.* FROM user u, address a WHERE a.city='New York' and
a.user_name=u.user_name
In Postgres the relationship between users and addresses can be
explicity defined. Once defined the address becomes a property of the
user, so the search above can be simplified greatly to:
SELECT * FROM user WHERE address.city='New York'"
Is the a load of nonsense, or am I doing something wrong? I did define a
foreign key, but it doesn't work.
From | Date | Subject | |
---|---|---|---|
Next Message | Mental | 2004-01-18 00:26:25 | importing data |
Previous Message | Leif K-Brooks | 2004-01-17 23:47:18 | Automatic joins? |