Re: [HACKERS] Little Suggestion for 6.6

Поиск
Список
Период
Сортировка
От The Hermit Hacker
Тема Re: [HACKERS] Little Suggestion for 6.6
Дата
Msg-id Pine.BSF.4.05.9906292303140.36396-100000@thelab.hub.org
обсуждение исходный текст
Ответ на Re: [HACKERS] Little Suggestion for 6.6  (Daniele Orlandi <daniele@orlandi.com>)
Список pgsql-hackers
On Wed, 30 Jun 1999, Daniele Orlandi wrote:

> 
> 
> The Hermit Hacker wrote:
> > 
> > > tacacs=> SELECT * FROM users,counters WHERE users.username=counters.username 
> > > AND username='foobar';
> > > ERROR:  Column 'username' is ambiguous
> > >
> > > ...username is NOT ambiguous...
> > 
> > Of course it is...which username do you want to match on, users.username
> > or counters.username?
> 
> IMHO it's the same, since they have to be equal...
> 
> Pardon me if I'm not seeing something obvious :^)

If I understand things (which could be pushing it), the join that is being
attempted (simplistically) gets broken down as something like:

a) find all usernames in users that exist in counters
b) find all usernames in ?? that equals foobar
c) find all a AND b

Very simplistic, mind you...

IN the above sample, b can't be resolved, since you don't tell it which
table to search for the username...

Marc G. Fournier                   ICQ#7615664               IRC Nick: Scrappy
Systems Administrator @ hub.org 
primary: scrappy@hub.org           secondary: scrappy@{freebsd|postgresql}.org 



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

Предыдущее
От: Adam Haberlach
Дата:
Сообщение: Re: [HACKERS] User requests now that 6.5 is out
Следующее
От: Todd Graham Lewis
Дата:
Сообщение: Re: [HACKERS] Hot Backup Ability