Re: generic return for functions
От | Tom Lane |
---|---|
Тема | Re: generic return for functions |
Дата | |
Msg-id | 26866.1054482407@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: generic return for functions (Rod Taylor <rbt@rbt.ca>) |
Ответы |
Re: generic return for functions
|
Список | pgsql-sql |
Rod Taylor <rbt@rbt.ca> writes: >> thing that causes me some minor grief is the fact that currently you=20 >> cannot have default values to function parameters, a feature we use a=20 >> lot. > fn(integer, integer, integer default 32) > select fn(integer, integer); <- Third argument would be '32'? > When PostgreSQL gets named parameters the above probably makes sense to > add. > A TODO item? That isn't ever going to happen. We have enough difficulty resolving overloaded functions as it is. If we couldn't even be sure how many arguments there were supposed to be, it'd become completely intractable. You can however achieve similar effects at the user level by adding auxiliary functions: declare fn(int,int) as a one-line SQL function that calls fn($1, $2, 32). regards, tom lane
В списке pgsql-sql по дате отправления: