[Pgsql-ayuda] Conditional execution: IF

Gunnar Wolf gwolf@gwolf.cx
Thu, 26 Jun 2003 19:32:59 -0500


sandrigo lezcano dijo [Fri, Jun 27, 2003 at 12:17:26AM +0100]:
> en Sybase tengo una:
> 
> Conditional execution: IF
> 
> IF condition THEN
>    Statement-list
> ELSEIF condition THEN
>    Statement-list
> ELSE
>    Statement-list
> END IF
> 
> No he visto en PostgreSQL...
> ...es tan complicado encontrar 
> cualquier cosa..

¿Complicado?

http://www.postgresql.org/docs/view.php?version=7.3&idoc=1&file=plpgsql-control-structures.html#PLPGSQL-CONDITIONALS
-----------------------------------
19.6.2. Conditionals

IF statements let you execute commands based on certain conditions.
PL/pgSQL has four forms of IF:

    *

      IF ... THEN
    *

      IF ... THEN ... ELSE
    *

      IF ... THEN ... ELSE IF and
    *

      IF ... THEN ... ELSIF ... THEN ... ELSE
-----------------------------------

Exactamente igual ;-)

-- 
Gunnar Wolf - gwolf@gwolf.cx - (+52-55)5630-9700 ext. 1366
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973  F800 D80E F35A 8BB5 27AF