Skip to content

Cannot create a table called 'domains' in PostgreSQL 8.1 due to a conflict with 'domains' object in information_schema #424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sqlalchemy-bot opened this issue Jan 17, 2007 · 2 comments
Labels
bug Something isn't working postgresql

Comments

@sqlalchemy-bot
Copy link
Collaborator

Migrated issue, originally created by Anonymous

When running .create_all() on a model that creates a table called 'domains' the table won't get created. SQLalchemy runs the query:

select relname from pg_class where lower(relname) = 'domains'

That query returns something because the information_schema in PostgreSQL has an object called 'domains'. My model even uses a certain PostgreSQL schema (namespace) so that SQLalchemy wouldn't even find the 'domains' object there. But the "select relname from pg_class..." query is too generic.

I need to run .create_all() with parameters checkfirst=None. But that will break the second time I try it.

@sqlalchemy-bot
Copy link
Collaborator Author

Michael Bayer (@zzzeek) wrote:

pls verify the changes I made in changeset:2208 are sane...

@sqlalchemy-bot
Copy link
Collaborator Author

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

@sqlalchemy-bot sqlalchemy-bot added postgresql bug Something isn't working labels Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working postgresql
Projects
None yet
Development

No branches or pull requests

1 participant