On Sun, Aug 16, 2009 at 05:55:08AM -0400, torea...@fastmail.fm wrote:
> Thank you for your recommendation
> I was able to get this to work
>
> select ('{{A,B,C},{D,E,F}}'::text[][])[i][j] from
> generate_series(1, array_upper('{{A,B,C},{D,E,F}}'::text[][], 1)) i
> cross join
> generate_seri
Thank you for your recommendation
I was able to get this to work
(using PG SQL parser to parse out two dimentional PG array
where the array data came from my client program instead of
a DB value)
select ('{{A,B,C},{D,E,F}}'::text[][])[i][j] from
generate_series(1, array_upper('{{A,B,C},{D,E,F
On Sat, Aug 15, 2009 at 01:41:12PM -0400, V S P wrote:
> but running into a problem as I cannot typecast correctly
>
> select V[i][j]
> FROM
> (select '{{A,B,C},{D,E,F}}') as V
> CROSS JOIN generate_series(1, 3) i
> CROSS JOIN generate_series(1,2) j
>
> Does not work, because V is not
Thank you very much , your suggestion
helped a lot
But, I have a bit more of a challenge now,
my array is being generated by the 'client' (it is not in the database)
so I am trying to employ your method on
'string'
but running into a problem as I cannot typecast correctly
s
V S P wrote:
if I have field declared
myvalue text[][]
insert into vladik (myval)
values
(
'{{"\",A", "\"B"}, {"Y", "Q"}}'
)
What do you guys use in your treasurechest of 'addons'
to successfully parse out the above trickery
and get
and get the 4 strings
",A
"B
Y
Q
from within Postgres store
if I have field declared
myvalue text[][]
insert into vladik (myval)
values
(
'{{"\",A", "\"B"}, {"Y", "Q"}}'
)
What do you guys use in your treasurechest of 'addons'
to successfully parse out the above trickery
and get
and get the 4 strings
",A
"B
Y
Q
from within Postgres stored procedure as