Re: What does this error mean?

From: SCassidy(at)overlandstorage(dot)com
To: Tom Allison <tom(at)tacocat(dot)net>
Cc: General PostgreSQL List <pgsql-general(at)postgresql(dot)org>
Subject: Re: What does this error mean?
Date: 2007-05-24 00:00:08
Message-ID: OF0A1885C7.3B4DE491-ON882572E4.00835ACC-882572E5.00000330@overlandstorage.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

If you have a statement using placeholders like:

select id from info where device_type = ? and drive_mfg = ?

and then prepare and execute it, something like:
$sth=$dbh->prepare($stmt) || errexit("bad prepare for stmt $stmt,
error: $DBI::errstr");
$rc=$sth->execute('TYPE1','ACME') || errexit("can't execute
statement:\n$stmt\nreturn code $rc: DB error: $DBI::errstr");

If the prepare thinks that the placeholders are of mixed types (as
supported by the driver), like:

select id from info where device_type = ? and drive_mfg = :2

Then, you will get the type of message you saw.

Probably your query is being built by the program where some odd character
is occasionally creeping in where you don't expect it. I assume that the
html entity references ('&quot;') are not actually in the error message.

Susan Cassidy

Tom Allison <tom(at)tacocat(dot)net>
Sent by: pgsql-general-owner(at)postgresql(dot)org
05/23/2007 03:59 PM

To
General PostgreSQL List <pgsql-general(at)postgresql(dot)org>
cc

Subject
[GENERAL] What does this error mean?

Cannot mix placeholder styles &quot;:foo&quot; and &quot;$1&quot; at /
sw/lib/perl5/5.8.6/darwin-thread-multi-2level//DBD/Pg.pm line 174.

I keep finding it from time to time on one script I have and I have
no clue what it's telling me.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

----------------------------------------------------------------------------------------------
Simply protected storage solutions ensure that your information is
automatically safe, readily available and always there, visit us at http://www.overlandstorage.com
----------------------------------------------------------------------------------------------

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Reyes 2007-05-24 00:04:21 Re: Delete with subquery deleting all records
Previous Message George Pavlov 2007-05-23 23:56:56 Re: Geographic data sources, queries and questions