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

Поиск
Список
Период
Сортировка
От Andreas Wenk
Тема Re: wording for 38.6.2.4. Simple CASE and 38.6.2.5. Searched CASE
Дата
Msg-id 4A892C95.3000701@netzmeister-st-pauli.de
обсуждение исходный текст
Ответ на Re: wording for 38.6.2.4. Simple CASE and 38.6.2.5. Searched CASE  (Andreas Wenk <a.wenk@netzmeister-st-pauli.de>)
Список pgsql-docs

Andreas Wenk schrieb:
> 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):
>
> 38.6.2.4. Simple CASE
>
> CASE expression
>     WHEN value [, value [ ... ]] THEN
>       statements
>   [ WHEN value [, value [ ... ]] THEN
>       statements
>     ... ]
>   [ ELSE
>       statements ]
> END CASE;
>
> Maybe it could also be value-expression ... but that I don't like that
> much.
>
> Then we could go further with this:
>
> 38.6.2.5. General CASE
>
> CASE
>     WHEN boolean-expression THEN
>       statements
>   [ WHEN boolean-expression THEN
>       statements
>     ... ]
>   [ ELSE
>       statements ]
> END CASE;
>
> 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
> together
>
> Cheers
>
> Andy
>
> P.S.: I can provide a patch with the changes if we discussed it and are
> willing to make a change

Hi,

before building a patch it would be nice to hear, if my approach to change the docu here
is a good one ...

Thanks

Andy

В списке pgsql-docs по дате отправления:

Предыдущее
От: Joshua Tolley
Дата:
Сообщение: Re: Help me to understand (documentation)
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: wording for 38.6.2.4. Simple CASE and 38.6.2.5. Searched CASE