Re: wording for 38.6.2.4. Simple CASE and 38.6.2.5. Searched CASE
От | Alvaro Herrera |
---|---|
Тема | Re: wording for 38.6.2.4. Simple CASE and 38.6.2.5. Searched CASE |
Дата | |
Msg-id | 20090817161010.GC4782@alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: wording for 38.6.2.4. Simple CASE and 38.6.2.5. Searched CASE (Andreas Wenk <a.wenk@netzmeister-st-pauli.de>) |
Ответы |
Re: wording for 38.6.2.4. Simple CASE and 38.6.2.5. Searched
CASE
|
Список | pgsql-docs |
Andreas Wenk wrote: > 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. "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> -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.
В списке pgsql-docs по дате отправления: