switch statement in plpgsql - Mailing list pgsql-novice

From Godshall Michael
Subject switch statement in plpgsql
Date
Msg-id A596FA3368757645AF862C701495CA000138CB74@hor1mspmx01.gmachs.com
Whole thread Raw
Responses Re: switch statement in plpgsql  (Robert Treat <xzilla@users.sourceforge.net>)
List pgsql-novice
Hello,
 
Is it possible to use a case switch statement in a plpgsql function or must I use If-Else statements only?
 
If so what is the format?
 
I have tried the following which when compiled is accepted but when I call the function it crashes.
 

switch(tregion)

{

case : ''San Ramon'' then tregion := ''San Ramon, CA'';

break;

}

pgsql-novice by date:

Previous
From: Dmitry Tkach
Date:
Subject: Re: help: now() + N is now failing!
Next
From: Tom Lane
Date:
Subject: Re: help: now() + N is now failing!