Search Postgresql Archives

Re: function with different return type depending on parameter?

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

 



Hey
http://www.postgresql.org/docs/9.3/static/plpgsql-declarations.html
at anyelement.

Cheers
Rémi-C


2014-02-12 10:20 GMT+01:00 James Harper <james.harper@xxxxxxxxxxxxxxxx>:
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






--
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