Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Little Suggestion for 6.6

From: The Hermit Hacker <scrappy(at)hub(dot)org>
To: Daniele Orlandi <daniele(at)orlandi(dot)com>
Cc: pgsql-hackers(at)hub(dot)org
Subject: Re: [HACKERS] Little Suggestion for 6.6
Date: 1999-06-30 02:06:04
Message-ID: Pine.BSF.4.05.9906292303140.36396-100000@thelab.hub.org (view raw or flat)
Thread:
Lists: 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(at)hub(dot)org           secondary: scrappy(at){freebsd|postgresql}.org 


In response to

pgsql-hackers by date

Next:From: Todd Graham LewisDate: 1999-06-30 02:10:41
Subject: Re: [HACKERS] Hot Backup Ability
Previous:From: Adam HaberlachDate: 1999-06-30 01:39:24
Subject: Re: [HACKERS] User requests now that 6.5 is out

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group