If two stored functions have the same name,name and types of arguments, but different return type, will they be considered as two distinct functions?
Asked
Active
Viewed 174 times
-1
-
1Did you, say, *try it* ? – Craig Ringer Mar 21 '14 at 13:42
-
[Related answer with some explanation and links to the manual.](http://stackoverflow.com/questions/12331981/error-function-addgeometrycolumn-is-not-unique/12332355#12332355) – Erwin Brandstetter Mar 21 '14 at 13:55
1 Answers
1
It is an error to try to create a function with the same name and arguments
create function f() returns int as $$
select 1;
$$ language sql;
CREATE FUNCTION
create function f() returns text as $$
select '1';
$$ language sql;
ERROR: function "f" already exists with same argument types

Clodoaldo Neto
- 118,695
- 26
- 233
- 260