Results 1 to 3 of 3
  1. #1
    Join Date
    May 2003

    Unanswered: Return any type from a function

    i am using postgres 7.3.2 . The problem is how can we create a function that accepts 3 parameters, and returns one value. the type of value returned is depended on the type of parameters the first parameter is a value of type bool. the second and third parameter is of any type. the actual need is return the second parameter if first parameter is true, and return third parameter if first parameter is false.

    ie a function that accept any parameter type and return any parameter type.

    i have to imitate the iif() in VB

    pls help...

    thanks in advance


  2. #2
    Join Date
    Apr 2003

    Thumbs up Maybe

    It's possible to retuen any type of value from a function using the returned type Opaque that would be neutral it's like
    CREATE OR REPLACE FUNCTION Doit(pamr1,pamar2,param3) Returns OPaque as '
    (I think ) any way I'm gonna try it
    Open up
    Take a look to my Blog

  3. #3
    Join Date
    May 2003
    your suggession does not work ... postgresql does not allow return type of OPaque...
    any other solutions...
    pls help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts