Search Postgresql Archives

PgSQL problem: How to split strings into rows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a table X with some column K consisting of whitespace-separated words.  Is there some SELECT query that will list all these words (for the entire table) so that there's one word per row in the returned table?  E.g.  If the table X is

           K
---------------------
 foo bar baz
 quux frobozz
 eeny meeny
 miny moe

...I want the result of this query to be

 foo
 bar
 baz
 quux
 frobozz
 eeny
 meeny
 miny
 moe

How can I do this?  (I have a slight preference for solutions that will work with version 8.2, but I'm interested in any solution to the problem.)

TIA!

~K



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux