CREATE PROCEDURE with similar IN/OUT argument list fails
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
The following statements trip over the ALTER ROUTINE that we send to the workers:
```sql
CREATE PROCEDURE ptest10(OUT a int, IN b int, IN c int)
LANGUAGE SQL AS $$ SELECT b - c $$;
CREATE PROCEDURE ptest10(IN a int, IN b int, IN c int)
LANGUAGE SQL AS $$ SELECT a + b - c $$;
NOTICE: issuing ALTER ROUTINE public.ptest10(integer,integer,integer) OWNER TO marco;
DETAIL: on server marco@localhost:1401 connectionId: 1
NOTICE: issuing ROLLBACK
DETAIL: on server marco@localhost:1402 connectionId: 2
ERROR: routine name "public.ptest10" is not unique
CONTEXT: while executing command on localhost:140
```
The correct way would be to include IN and OUT in the ALTER ROUTINE:
```sql
ALTER ROUTINE public.ptest10(IN integer,IN integer, IN integer) OWNER TO marco;
```
Contributor guide
Assessment
This issue has not been assessed yet.