7.0.3 select/join syntax?

Поиск
Список
Период
Сортировка
От will trillich
Тема 7.0.3 select/join syntax?
Дата
Msg-id 20010616155334.B14950@serensoft.com
обсуждение исходный текст
Ответы Re: 7.0.3 select/join syntax?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
i've been perusing the source code for Aparthia (it's a mod_perl
and HTML::Mason website framework that hooks into postgresql)
which contained some perl stuff like

my $st = $dbh->prepare("SELECT a.auction_id,a.title,f.grade,f.comment, login(f.person_id)
    FROM forum f join auction a on (auction_id)
    WHERE f.auction_id = ? and f.person_id = ?");

i can't find "JOIN" in the documentation i've got (for 7.0.3)
regarding the SELECT statement...

select
    a.auction_id,
    a.title,
    f.grade,
    f.comment,
    login(f.person_id)
from
    forum f
    JOIN auction a ON (auction_id) -- say what?
where
    f.auction_id = ?
    and
    f.person_id = ?

i presume that basically adds a WHERE clause like
    forum f join auction a on (auction_id)
    ==
    where f.auction_id = a.auction_id
? (i could be wrong, i suppose.)

which i tried on some of my databases, and what i get instead is
"ambiguous"--

    > select e.name,t.name from _edu e join _topic t on (id);
    ERROR:  Column 'id' is ambiguous

are there some unreleased docs that detail this feature?

--
I figure: if a man's gonna gamble, may as well do it
without plowing.   -- Bama Dillert, "Some Came Running"

will@serensoft.com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

В списке pgsql-general по дате отправления:

Предыдущее
От: will trillich
Дата:
Сообщение: Re: Need help with COPY
Следующее
От: Tom Lane
Дата:
Сообщение: Re: 7.0.3 select/join syntax?