Error - Arrays must contain only scalars and other arrays when array element is an array - Mailing list pgsql-sql

From Mike Martin
Subject Error - Arrays must contain only scalars and other arrays when array element is an array
Date
Msg-id CAOwYNKZq+jgWVTkPoUDThAi9n5gqq9arpbh_qAmUh0NZ2fA6BQ@mail.gmail.com
Whole thread Raw
List pgsql-sql
I have the interesting issue as per subject line

SOURCE data (perl DBD::Pg)

my $testdatasql=<<~'SQLSTR';
SELECT fileid,tagname,tagvalue--array_to_string(tagvalue,E'\b')
FROM tagdata_all
where tagvalue is not null
limit 100
SQLSTR
my $testdata=$dbh->selectall_arrayref($testdatasql);
my @testdata=@{$testdata};

Then with unnest

my $testinssql2=<<~'SQLSTR';
TRUNCATE TABLE testunnest;
SELECT elem,nr FROM UNNEST ($1::text[][]) WITH ORDINALITY AS a(elem,nr)
SQLSTR
my $chk=$dbh->selectall_arrayref ($testinssql2,undef,\@testdata);

@testdata is a two-dimensional array with the second dimension being
int, text and text[] (array)

Any ideas?

pgsql-sql by date:

Previous
From: Steve Midgley
Date:
Subject: Re: Group by a range of values
Next
From: ml@ft-c.de
Date:
Subject: recursive sql