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

Re: wording for 38.6.2.4. Simple CASE and 38.6.2.5. Searched CASE

From: Andreas Wenk <a(dot)wenk(at)netzmeister-st-pauli(dot)de>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-docs(at)postgresql(dot)org
Subject: Re: wording for 38.6.2.4. Simple CASE and 38.6.2.5. Searched CASE
Date: 2009-08-17 16:15:21
Message-ID: 4A898219.9000506@netzmeister-st-pauli.de (view raw or flat)
Thread:
Lists: pgsql-docs
Alvaro Herrera schrieb:
> "simple case" and "searched case" is SQL/PSM's terminology.  I'm not
> sure it's necessarily a good idea to deviate from that.  See SQL part 4,
> 13.6 <case statement>:
> 
> Function
> Provide conditional execution based on truth of <search condition>s or on equality of operands.
> 
> Format
> <case statement> ::=
>     <simple case statement>
>   | <searched case statement>
> <simple case statement> ::=
>     CASE <case operand>
>     <simple case statement when clause>...
>     [ <case statement else clause> ]
>     END CASE
> <searched case statement> ::=
>     CASE <searched case statement when clause>...
>     [ <case statement else clause> ]
>     END CASE
> <simple case statement when clause> ::=
>     WHEN <when operand list>
>     THEN <SQL statement list>
> <searched case statement when clause> ::=
>     WHEN <search condition>
>     THEN <SQL statement list>
> <case statement else clause> ::= ELSE <SQL statement list>

Agreed ... using the standard terminology is better (as Tom also mentioned already).

Cheers

Andy

In response to

pgsql-docs by date

Next:From: Jaime CasanovaDate: 2009-08-18 22:08:01
Subject: incorrect syntax for offset
Previous:From: Alvaro HerreraDate: 2009-08-17 16:10:10
Subject: Re: wording for 38.6.2.4. Simple CASE and 38.6.2.5. Searched CASE

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