Skip to content

Commit

Permalink
Fix error: Cannot execute SQL 'SELECT proacl::text FROM pg_catalog.pg… (
Browse files Browse the repository at this point in the history
#783)

* Fix error: Cannot execute SQL 'SELECT proacl::text FROM pg_catalog.pg_proc WHERE proname = ANY (%s) ORDER BY proname, proargtypes': syntax error at or near "%"

* Fix error: Cannot execute SQL 'SELECT proacl::text FROM pg_catalog.pg_proc WHERE proname = ANY (%s) ORDER BY proname, proargtypes': syntax error at or near "%"

* Update changelogs/fragments/783-fix-postgresql-privs-not-specified-schema.yml

Co-authored-by: Andrew Klychkov <[email protected]>

---------

Co-authored-by: Andrew Klychkov <[email protected]>
  • Loading branch information
glushkovds and Andersson007 authored Dec 23, 2024
1 parent 6d12f71 commit 1b8b94d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- postgresql_privs - fix the error occurring when trying to grant a function execution and set the schema to not-specified (https://github.com/ansible-collections/community.postgresql/pull/783).
2 changes: 1 addition & 1 deletion plugins/modules/postgresql_privs.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ def get_function_acls(self, schema, function_signatures):
else:
query = ("SELECT proacl::text FROM pg_catalog.pg_proc WHERE proname = ANY (%s) "
"ORDER BY proname, proargtypes")
self.execute(query)
self.execute(query, (funcnames))
return [t["proacl"] for t in self.cursor.fetchall()]

def get_schema_acls(self, schemas):
Expand Down

0 comments on commit 1b8b94d

Please sign in to comment.