Error - Arrays must contain only scalars and other arrays when array element is an array

Поиск
Список
Период
Сортировка
От Mike Martin
Тема Error - Arrays must contain only scalars and other arrays when array element is an array
Дата
Msg-id CAOwYNKZq+jgWVTkPoUDThAi9n5gqq9arpbh_qAmUh0NZ2fA6BQ@mail.gmail.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Steve Midgley
Дата:
Сообщение: Re: Group by a range of values
Следующее
От: ml@ft-c.de
Дата:
Сообщение: recursive sql