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

Re: wording for Simple CASE and Searched CASE

From: Andreas Wenk <a(dot)wenk(at)netzmeister-st-pauli(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: wording for Simple CASE and Searched CASE
Date: 2009-08-14 21:39:07
Message-ID: (view raw or whole thread)
Lists: pgsql-docs
Tom Lane wrote:
> Hmm, it would be important to keep this in sync with the core-SQL
> description of CASE, no?  (Section 9.16.1)

yes. And there is written "general" form and "simple" form. I like that.

> I can't say that I think "simple CASE" and "searched CASE" are good
> descriptions of the two forms, but just switching them doesn't make it
> much better.  And doing so would likely create as much confusion as
> it eliminates.  Can we come up with some other phrases?

IMO it should be the same like in 9.16.1 - a "general" form and a 
"simple" form. Then changing both sections would be ok, because in 
9.16.1 the simple form is mentioned after the general form.

Would it be correct to change it in this direction - or is this 
logically wrong (change expression to value): Simple CASE

CASE expression
     WHEN value [, value [ ... ]] THEN
   [ WHEN value [, value [ ... ]] THEN
     ... ]
   [ ELSE
       statements ]

Maybe it could also be value-expression ... but that I don't like that much.

Then we could go further with this: General CASE

     WHEN boolean-expression THEN
   [ WHEN boolean-expression THEN
     ... ]
   [ ELSE
       statements ]

The general form of CASE provides conditional execution based on truth 
of boolean expressions. ...

I think with these changes, 9.16.1 and this two sections are working 



P.S.: I can provide a patch with the changes if we discussed it and are 
willing to make a change

In response to


pgsql-docs by date

Next:From: Peter EisentrautDate: 2009-08-14 22:32:33
Subject: Re: documentation output directory
Previous:From: Stefan KaltenbrunnerDate: 2009-08-14 21:34:53
Subject: Re: [COMMITTERS] pgsql: Use DocBook XSL stylesheets for man page building This switches

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