Skip site navigation (1) Skip section navigation (2)

switch statement in plpgsql

From: Godshall Michael <Michael_Godshall(at)gmachs(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: switch statement in plpgsql
Date: 2003-07-29 16:18:38
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
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.


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




pgsql-novice by date

Next:From: Mel JameroDate: 2003-07-29 16:20:36
Subject: Re: help: now() + N is now failing!
Previous:From: Tom LaneDate: 2003-07-29 16:17:04
Subject: Re: help: now() + N is now failing!

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group