Skip to content
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

postgresql_idx: consider schema name when checking #693

Merged

Conversation

rlaager
Copy link
Contributor

@rlaager rlaager commented May 8, 2024

SUMMARY

When checking to see if an index exists, the schema name needs to be taken into account. That is, the same name can exist in multiple schemas.

Fixes #692

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

community.general.postgresql_idx

Copy link
Collaborator

@hunleyd hunleyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the fix! could you please add a changelog fragment under the bugfix: key?

When checking to see if an index exists, the schema name needs to be
taken into account.  That is, the same name can exist in multiple
schemas.

Fixes ansible-collections#692
@rlaager rlaager force-pushed the postgresql_idx-schema branch from 85fb83c to e8b980f Compare May 8, 2024 19:20
@rlaager
Copy link
Contributor Author

rlaager commented May 8, 2024

Done. I'm not sure how verbose you want me to be. I can drop the additional sentences if you prefer shorter.

Also, I wasn't able to find documentation on things like line length, so let me know if I need to rewrap the code (the exec_sql statement) or the changelog fragment.

@hunleyd hunleyd self-requested a review May 9, 2024 12:44
@Andersson007
Copy link
Collaborator

@rlaager hi, welcome to the project and thanks for the contribution!

@Andersson007 Andersson007 merged commit 09fec84 into ansible-collections:main May 10, 2024
36 checks passed
Copy link

patchback bot commented May 10, 2024

Backport to stable-2: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-2/09fec8451755579c98664a9e3903f498da3b1a4d/pr-693

Backported as #694

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request May 10, 2024
When checking to see if an index exists, the schema name needs to be
taken into account.  That is, the same name can exist in multiple
schemas.

Fixes #692

(cherry picked from commit 09fec84)
@Andersson007
Copy link
Collaborator

Merged!
@hunleyd thanks for reviewing!

hunleyd pushed a commit that referenced this pull request May 10, 2024
When checking to see if an index exists, the schema name needs to be
taken into account.  That is, the same name can exist in multiple
schemas.

Fixes #692

(cherry picked from commit 09fec84)

Co-authored-by: Richard Laager <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

postgresql_idx only takes into account idxname (not schema)
3 participants