Re: simple join problem

Поиск
Список
Период
Сортировка
Искать
От
Matthew Nuzum
Тема
Re: simple join problem
Дата
Msg-id
004001c2d85c$05d214c0$6900a8c0@mattspc
Ответ на
Список
Дерево обсуждения
simple join problem "Matthew Nuzum" <cobalt@bearfruit.org>
Re: simple join problem Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: simple join problem Josh Berkus <josh@agliodbs.com>
Re: simple join problem "Matthew Nuzum" <cobalt@bearfruit.org>
Re: simple join problem <mallah@trade-india.com>
Re: simple join problem "Matthew Nuzum" <cobalt@bearfruit.org>
Re: simple join problem Richard Huxton <dev@archonet.com>
> >
> > Here's my view definition:
> > SELECT
> > 	users.uid, users.loginid, users."password", users.title,
> > 	users.firstname, users.middlename, users.lastname, users.suffix,
> > 	users.organization, users.job_title, users_address.address1,
> > 	users_address.address2, users_address.address3, users_address.city,
> >  	users_address.state, users_address.zip, users_address.country,
> > 	users_email.email, users_phone.phone
> > FROM (((users
> > 	LEFT JOIN users_address ON ((users.uid = users_address.uid AND
> users_address.primary = TRUE)))
> > 	LEFT JOIN users_email ON ((users.uid = users_email.uid and
> users_email.primary = TRUE)))
> > 	LEFT JOIN users_phone ON ((users.uid = users_phone.uid and
> users_phone.primary = TRUE))) ;
> 
> It's a neat trick that join conditions can be *any* expression that
> evaluates
> to a boolean value.

That is a neat trick.  Thanks for the info everyone.  I feel better knowing
that even though it was a simple problem it's not quite as obvious as I
thought.

--
Matthew Nuzum
www.bearfruit.org
cobalt@bearfruit.org



В списке pgsql-sql по дате отправления
От: JBJ
Дата:
От: Josh Berkus
Дата:
Сообщение: Re: PL/PGSQL EDITOR
FAQ