On Wed, Sep 24, 2003 at 23:30:08 -0600, Roberto Mello <rmello@cc.usu.edu> wrote:
> On Wed, Sep 24, 2003 at 08:35:50PM -0700, George A.J wrote:
>
> > Another problem is in creating function...
> > How can i create a function that accept and return any type. the type "any" is not allowing as parameter or return
type.Is it possible? i want to create a function similar to NULLIF().
>
> Use the standard coalesce().
coalesce is used to do the inverse of nullif. Postgres also has a nullif
function.
I suspect that he relly doesn't want to use either of those, but instead
wants to have some function that returns the same type as its argument
without having to write one function for each different type. There is
something along those lines coming in 7.4.