Re: Join Advice and Assistance

Поиск
Список
Период
Сортировка
От Gary Chambers
Тема Re: Join Advice and Assistance
Дата
Msg-id 302670f21002221443r4ab62e4dk2bc61f4fa55f9a48@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Join Advice and Assistance  (Stephen Belcher <sycobuny@malkier.net>)
Список pgsql-sql
Stephen,

> If you want to return a single row for each user, regardless of the number
> of email addresses, you might use ARRAY() with a subquery, eg (haven't
> tested this to make sure it completely works):

Your query worked perfectly!

> Of course, this will return the addresses as a character varying[], with
> output like {user@domain.tld,user@domain.tld}, and would require some minor
> contortions to present it to users cleanly. The array_to_string function may
> help you make it easier to display the results.

Absolutely -- and thank you for the suggestion.  I'll be retrieving
the results of the query through PHP, so cleanup in the query may even
be a performance degradation.

> Hope this helps,

You and Rob Sargent have helped a great deal.  Thanks to both of you.

-- Gary Chambers

/* Nothing fancy and nothing Microsoft! */


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

Предыдущее
От: Stephen Belcher
Дата:
Сообщение: Re: Join Advice and Assistance
Следующее
От: Louis-David Mitterrand
Дата:
Сообщение: join with an array