Re: [SQL] generic return for functions

2003-06-02 Thread Josh Berkus
Avi, > I understand why it will not be implemented with overloaded functions. > Is there a possibility to allow this only for functions that are not > overloaded? Unfortunately, no. There's simply no way for the database to tell the difference between a function call relying on defaults, and

Re: [SQL] generic return for functions

2003-06-02 Thread Avi Schwartz
On Sunday, Jun 1, 2003, at 10:46 America/Chicago, Tom Lane wrote: Rod Taylor <[EMAIL PROTECTED]> 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)

Re: [SQL] generic return for functions

2003-06-02 Thread Tom Lane
Rod Taylor <[EMAIL PROTECTED]> 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

Re: [SQL] generic return for functions

2003-06-02 Thread Avi Schwartz
Exactly. It is used with named parameters when the parameter is not provided. Avi On Sunday, Jun 1, 2003, at 07:21 America/Chicago, Rod Taylor wrote: thing that causes me some minor grief is the fact that currently you cannot have default values to function parameters, a feature we use a lot.

Re: [SQL] generic return for functions

2003-06-01 Thread Rod Taylor
> thing that causes me some minor grief is the fact that currently you > cannot have default values to function parameters, a feature we use a > lot. The default value is used when the parameter is NULL or unprovided? fn(integer, integer, integer default 32) select fn(integer, integer); <- Thi

Re: [SQL] generic return for functions

2003-06-01 Thread Joe Conway
Danny Su wrote: I am currently converting everything from SQL Server to PostgreSQL. This is for an application that is going to support Oracle, SQL Server and PostgreSQL at the same time. I have done a lot of the conversion already but I am stuck on functions that returns parts of views or tab

Re: [SQL] generic return for functions

2003-06-01 Thread Avi Schwartz
I am afraid you are in exactly the same boat I am in. Coldfusion does not recognize the refcursor and as far as I know, currently the only way to return a result set that CF can read is to return a setof which requires you to return a user defined data type or a record. Another thing that cau

[SQL] generic return for functions

2003-06-01 Thread Danny Su
Hi, this is my first time using mailing list. Someone over at tek-tips suggested that I try here to see if someone can help me. I am currently converting everything from SQL Server to PostgreSQL. This is for an application that is going to support Oracle, SQL Server and PostgreSQL at the same