Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion psqlextra/backend/introspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def get_constraints(self, cursor, table_name: str):
# standard Django implementation does not return the definition
# for indexes, only for constraints, let's patch that up
cursor.execute(
"SELECT indexname, indexdef FROM pg_indexes WHERE tablename = %s",
"SELECT indexname, indexdef FROM pg_indexes WHERE schemaname = current_schema() AND tablename = %s",
(table_name,),
)
for index_name, definition in cursor.fetchall():
Expand Down