terraform-provider-postgresql
terraform-provider-postgresql copied to clipboard
Support Function Overloading
Hi there, First of all thanks for this awesome repo and for taking the time reading through this issue.
As you may know PostgreSQL supports function overloading. In our team we use that to have multiple functions with the same name doing slightly different things.
Example:
public.resolve_text(text)
public.resolve_text(text, char)
As for now this provider does not support granting such functions execute privileges.
Affected Resource(s)
- postgresql_grant
Expected Behavior
Grant EXECUTE privilege to specified function.
resource "postgresql_grant" "function" {
database = "test_db"
role = "test_role"
schema = "public"
object_type = "function"
objects = ["resolve_text(text, char)"]
privileges = ["EXECUTE"]
}
Actual Behavior
Throws error that function cannot be found:
could not find a function named "public.resolve_text(text, char)"
Steps to Reproduce
- Use the resource specified in Expected Behavior
- Terraform apply
References
- #228