On Tue, Jan 24, 2006 at 05:51:37PM +0000, Luis Silva wrote:
> I there, do we have switch(){ case:} in pl/pgsql. Tks
See the PL/pgSQL documentation, in particular the "Control Structures"
section. Here's the link for 8.1 (but use the documentation for
whatever version you're running):
http://www.postgresql.org/docs/8.1/interactive/plpgsql-control-structures.html
The documentation shows no switch/case structure but you should be
able to do the same thing with IF-THEN-ELSIF. However, SQL does
have a CASE expression that you might be able to use:
http://www.postgresql.org/docs/8.1/interactive/functions-conditional.html
--
Michael Fuhr