switch / case in plpgsql functions

Started by Emi Luabout 20 years ago2 messagesgeneral
Jump to latest
#1Emi Lu
emilu@encs.concordia.ca

Hello,

May I know whether plpgsql supports "switch / case " or I have to use IF
/ELSIF please?

Thanks,
Emi

#2Joachim Wieland
joe@mcknight.de
In reply to: Emi Lu (#1)
Re: switch / case in plpgsql functions

On Tue, Feb 14, 2006 at 10:55:33AM -0500, Emi Lu wrote:

May I know whether plpgsql supports "switch / case " or I have to use IF
/ELSIF please?

http://www.postgresql.org/docs/8.1/static/plpgsql-control-structures.html#PLPGSQL-CONDITIONALS

does not list something like the switch / case construct so you'll have to
use IF ... ELSIF.

Joachim

--
Joachim Wieland joe@mcknight.de
C/ Usandizaga 12 1°B ICQ: 37225940
20002 Donostia / San Sebastian (Spain) GPG key available