Closed
Description
Migrated issue, originally created by Anonymous
I recently ran into ProgrammingError due to missing Enum support when deploying some stuff on a server running PostgreSQL-8.1.
Documentation should mention that Enum on Postgres is supported only with 8.3+ as I don't think it really makes sense to detect version and fall back to the string with checks.
Metadata
Metadata
Assignees
Labels
Type
Projects
Relationships
Development
No branches or pull requests
Activity
sqlalchemy-bot commentedon Jun 25, 2010
Michael Bayer (@zzzeek) wrote:
the
Enum
type is a generic type that works on all backends, including PG pre 8.3 - here's the doc:so detecting that ENUM is not possible on a particular version and falling back to a generic version is the correct behavior.
If you want to use only a "real" Postgresql ENUM, you'd be better off using
sqlalchemy.dialects.postgresql.ENUM
.We can add a line to
Enum
"this behavior includes backends that only provide ENUM as of a recent version, such as Postgresql 8.3, for example - see the ENUM type within the dialect itself for the purely native version", if that's the issue here.sqlalchemy-bot commentedon Jun 25, 2010
Anonymous wrote:
Hmm.. I was using the basic Enum, but it didn't fall back to the VARCHAR + CHECK version:
PostgreSQL version is 8.1.21
sqlalchemy-bot commentedon Jun 25, 2010
Michael Bayer (@zzzeek) wrote:
then that is a bug. This should be fixed in 3eab798. Can you please confirm it works on your PG 8.1 setup, thanks.
sqlalchemy-bot commentedon Jun 25, 2010
Changes by Michael Bayer (@zzzeek):
sqlalchemy-bot commentedon Jun 26, 2010
Anonymous wrote:
Now works on both 8.1 and 8.4 :)
sqlalchemy-bot commentedon Jun 26, 2010
Changes by Michael Bayer (@zzzeek):