Re: "and then" / "or else"

From: Christian Schröder <cs(at)deriva(dot)de>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: "and then" / "or else"
Date: 2007-11-17 14:41:23
Message-ID: 473EFD93.3040109@deriva.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Glaesemann 2007-11-17 14:49:36 Re: pg_dump not including custom CAST?
Previous Message Michael Glaesemann 2007-11-17 13:24:51 Re: Composite types for composite primary/foreign keys?