Skip to content

Commit 144811f

Browse files
authored
Fix arg type casting in FunctionExists (#8471)
`FunctionExists` wasn't heavily used with wild argtypes until the persistent cache (single evict), where function argument types required proper quoting. So instead of generating: ```sql 'edgedbpub.7c77c4b3-c60c-11ef-9dc9-45e8c8454bf8_domain'::regtype::oid ``` It should be: ```sql 'edgedbpub."7c77c4b3-c60c-11ef-9dc9-45e8c8454bf8_domain"'::regtype::oid ``` Fixes #8470 - [ ] Add test
1 parent 4920ab7 commit 144811f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

edb/pgsql/dbops/functions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def __init__(self, name, args=None):
7777
self.args = FunctionOperation.normalize_args(args)
7878

7979
def code(self) -> str:
80-
targs = [f"{ql('.'.join(a))}::regtype::oid" for _, a, _ in self.args]
80+
targs = [f"{ql(qt(a))}::regtype::oid" for _, a, _ in self.args]
8181
args = f"ARRAY[{','.join(targs)}]"
8282

8383
return textwrap.dedent(f'''\

0 commit comments

Comments
 (0)