[odb-users] Postgres error: 42P05 prepared statement already exists

Boris Kolpackov boris at codesynthesis.com
Fri Jul 11 07:01:38 EDT 2014


Hi Alessandro,

Alessandro Bellina <abellina at gmail.com> writes:

> I don’t have other tables with similar names in my table space. Do
> you create more than one statement using the table as the prefix?

Yes, there are several statements for each object/table. The way we
construct their names is by appending the "statement kind suffix"
(e.g., "_persist", "_find", etc) to the table name. If the table
name is long and gets truncated, these suffixes are effectively
ignored.

>From this analysis it is pretty clear that we should make them
prefixes and not suffixes. This way we will stand much better
chance of ending up with unique names even in case of truncation.
I've added this to my TODO list.

In the meantime, however, the easiest solution is to shorten
the table name (db table pragma).

Boris



More information about the odb-users mailing list