Search Postgresql Archives

Re: Function with DEFAULT arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tom Lane wrote:
"dario.ber@xxxxxxxxx" <dario.ber@xxxxxxxxx> writes:
I'm trying to use the DEFAULT option to pass parameters to the arguments of a function. When I call that function, how can I change the default value of some arguments and leave as default the value of other arguments?

You can only omit arguments from right to left, so basically what this
requires is some foresight while choosing the function's argument order.

			regards, tom lane


What do you think about allowing 'default' as a parameter the way we do when inserting a record?

So if a param has a default value, the function call may look like:

SELECT foo(default, 'hello', 43)


Scott Bailey

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux