function with different return type depending on parameter?

Поиск
Список
Период
Сортировка
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 по дате отправления:

Предыдущее
От: Adarsh Sharma
Дата:
Сообщение: Re: Xlogdump compiling error : undefined reference to `ber_sockbuf_io_udp'
Следующее
От: Rémi Cura
Дата:
Сообщение: Re: function with different return type depending on parameter?