ERROR: prepared statement "dbdpg_p13754_3" does not exist

Bill Moseley <[email protected]>
Newsgroups gmane.comp.db.postgresql.dbdpg
Message-ID <[email protected]>
I'm trying to get a handle on what's happening with this error.
As I write this I'm thinking it's more a DBI issue.


Sometimes when we alter a table we get the error in the subject.
It requires a restart of our application.

Typically, what happens is the SELECT statement includes a column
that is not in the database.  I get an error like this:

    DBD::Pg::st execute failed: \
    ERROR: column "foo" does not exist
    [for Statement "SELECT id, bar, foo from baz ....

which is understandable since the column doesn't exist.


Then after adding the column the error changes to:

    "DBD::Pg::st execute failed: \
    ERROR: prepared statement "dbdpg_p14158_3" does not exist
    [for Statement "SELECT id, bar, foo from baz ....

My guess is DBI / DBI::Pg thought it prepared with the first select
and then later tried to call execute with "dbdpg_p14158_3".

One thing throwing me off is that first error says

    execute failed

not "prepare failed".  But, I assume that was really a prepare.

Anyway, if the first error was really from a prepare, shouldn't the
error be noticed and then remove (or don't store) the "dbdpg_p14158_3"
key from the cache?

Or is there something else going on here?

Thanks,


-- 
Bill Moseley
[email protected]
Sent from my iMutt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.