sqlc
sqlc copied to clipboard
No support for function overloading
Version
1.27.0
What happened?
I have Postgresql schema where I define overloaded function to handle many column types.
CREATE FUNCTION foo(text)
CREATE FUNCTION foo(text[])
Unfortunately during schema parsing sqlc returns an errors saying that function foo already exists which is not true. The function is in fact defined by full signature, not just the name.
Relevant log output
relation "foo" already exists
Database schema
CREATE FUNCTION foo(text)
CREATE FUNCTION foo(text[])
### SQL queries
_No response_
### Configuration
_No response_
### Playground URL
_No response_
### What operating system are you using?
_No response_
### What database engines are you using?
_No response_
### What type of code are you generating?
_No response_
I looked at details and it seems the problem is just text vs text[]. If I try with completely different type like text vs number the problem disappears. This makes me think that that in fact there is signature check but for some reason text is confused with text[] like they are the same type.