Re: BUG #2553: Outer join bug

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: BUG #2553: Outer join bug
Дата
Msg-id 20060728155231.GA95933@winnie.fuhr.org
обсуждение исходный текст
Ответ на BUG #2553: Outer join bug  ("Steven Adams" <swadams3@comcast.net>)
Список pgsql-bugs
[Please copy the mailing list on replies so others can participate
in and learn from the discussion.]

On Fri, Jul 28, 2006 at 09:54:42AM -0500, Steven Adams wrote:
> I wanted the row to show whether or not there was a matching row in the
> other table, but I wanted to return exactly 1 row.

As Tom Lane already pointed out, you're probably needing a WHERE
clause.  Does this do what you want?

SELECT ia.name, iac.internal
FROM information_assets AS ia
LEFT OUTER JOIN information_asset_categories AS iac ON ia.category_id = iac.id
WHERE ia.id = 21;

--
Michael Fuhr

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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Query returned unhandled type 16411
Следующее
От: Martin Pitt
Дата:
Сообщение: Fwd: Bug#380047: libpq-dev: no declaration for pg_encoding_to_char