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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: Join Advice and Assistance



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(at)domain(dot)tld,user(at)domain(dot)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! */



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group