Is there any easy way of converting a postgres table in to an 2 dimensional?
I have a data table foobar with two columns foo and bar which has the following data in 1,2 3,4 5,6
I want to convert it in
{
{1,2},
{3,4},
{5,6}
}
I have tried things like
select ARRAY[foo,bar] from foobar
which creates
{1,2}
{3,4}
{5,6}
Which is nearly there
I suspect that I am going to have to write pgpsql function to do this? Any suggestions?