Re: "and then" / "or else" - Mailing list pgsql-general

From Christian Schröder
Subject Re: "and then" / "or else"
Date
Msg-id 473EFD93.3040109@deriva.de
Whole thread Raw
In response to Re: "and then" / "or else"  (Michael Glaesemann <grzm@seespotcode.net>)
List pgsql-general
Michael Glaesemann wrote:
> On Nov 17, 2007, at 3:53 , Christian Schröder wrote:
>
>> Unfortunately, the trick from the docs (chapter 4.2.12) using "case
>> ... then" does not work inside an "if" statement (the "then" of the
>> "case" is interpreted as belonging to the "if" and thus leads to a
>> syntax error).
>
> I think if you use parentheses you can avoid the syntax error:
Ah, I didn't know that parentheses are allowed here. (And I must admit I
didn't try.)
Nonetheless, I think it would improve readability to have an extra
operator for this.

Regards,
    Christian

--
Deriva GmbH                         Tel.: +49 551 489500-42
Financial IT and Consulting         Fax:  +49 551 489500-91
Hans-Böckler-Straße 2                  http://www.deriva.de
D-37079 Göttingen

Deriva CA Certificate: http://www.deriva.de/deriva-ca.cer


pgsql-general by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: Composite types for composite primary/foreign keys?
Next
From: Michael Glaesemann
Date:
Subject: Re: pg_dump not including custom CAST?