function with different return type depending on parameter? - Mailing list pgsql-general

From James Harper
Subject function with different return type depending on parameter?
Date
Msg-id 6035A0D088A63A46850C3988ED045A4B6F39F5DE@BITCOM1.int.sbss.com.au
Whole thread Raw
Responses Re: function with different return type depending on parameter?  (Rémi Cura <remi.cura@gmail.com>)
Re: function with different return type depending on parameter?  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: function with different return type depending on parameter?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
is it possible to have a function that can return a different type depending on the parameters? Eg (approximately)

if param = "one" then return 1
if param = "two" then return "2"
if param = "three" then return 3.0
etc

I can't see any variant type

thanks

James






pgsql-general by date:

Previous
From: Adarsh Sharma
Date:
Subject: Re: Xlogdump compiling error : undefined reference to `ber_sockbuf_io_udp'
Next
From: Rémi Cura
Date:
Subject: Re: function with different return type depending on parameter?