DBI Exception: DBD::Pg::st execute failed: ERROR:  could not determine
data type of parameter $2 [for Statement "insert into Jobs_Solleciti
(sollecito, state_description, email_utente) values (?,xmlelement(name
description, ?),?)" with ParamValues: 1='498', 2='fax da spedire',
3='france...@dominiotest.it']

sbo_devel=> \d jobs_solleciti
                      Table "public.jobs_solleciti"
      Column       |            Type             |
Modifiers
-------------------+-----------------------------
+------------------------
 sollecito         | integer                     | not null
 data              | timestamp without time zone | not null default
now()
 done              | boolean                     | default false
 state             | integer                     | default 0
 state_descruption | xml                         |
 email_utente      | text                        |
Indexes:
    "jobs_solleciti_pkey" PRIMARY KEY, btree (sollecito, data)
Foreign-key constraints:
    "jobs_solleciti_sollecito_fkey" FOREIGN KEY (sollecito) REFERENCES
solleciti(id)

this error was first for following statement:

my $sth = $dbh->prepare(q(insert into Jobs_Solleciti (sollecito,
state_description, email_utente) values (?,xmlelement(name
description, ?),?)));

$sth->execute($sollecito->id, $descrizione_stato, $email_utente);

Then I've exchange last with:

            $sth->bind_param(1, $sollecito->id);
            $sth->bind_param(2, $descrizione_stato, {PG_TYPE=>'PG_XML'});
            $sth->bind_param(3, $email_utente);
            $sth->execute();

without success
and again:

-           $sth->bind_param(2, $descrizione_stato, {PG_TYPE=>'PG_XML'});
+           $sth->bind_param(2, $descrizione_stato, {PG_TYPE=>'PG_TEXT'});

but without success too.

Have you hint?

Thank you in advance,             \ferz

PS:
DBI           1.615
DBD::Pg   2.17.1
perl 5.10.1

Reply via email to