S
stroncococcus
Hy there!
I am just writing a little script to put something into a postgresql
database table.
My prepare statement:
my $mature_link_update = $dbh->prepare("UPDATE mature_mirna SET
loop_links = (loop_links || ARRAY[?]) WHERE mat_accession=?");
But whenever I execute this, with
$mature_link_update->execute($loop_table_id, $mat_accession);
or
$mature_link_update->execute(int($loop_table_id), $mat_accession);
then I get this error:
"operator does not exist: integer[] || text[]
HINT: No operator matches the given name and argument type(s). You may
need to add explicit type casts."
So the variable $loop_table_id is interpreted as text everytime.
What can I do, that it is handled as integer?
Many thanks in advance,
Kai
I am just writing a little script to put something into a postgresql
database table.
My prepare statement:
my $mature_link_update = $dbh->prepare("UPDATE mature_mirna SET
loop_links = (loop_links || ARRAY[?]) WHERE mat_accession=?");
But whenever I execute this, with
$mature_link_update->execute($loop_table_id, $mat_accession);
or
$mature_link_update->execute(int($loop_table_id), $mat_accession);
then I get this error:
"operator does not exist: integer[] || text[]
HINT: No operator matches the given name and argument type(s). You may
need to add explicit type casts."
So the variable $loop_table_id is interpreted as text everytime.
What can I do, that it is handled as integer?
Many thanks in advance,
Kai