Re: plpgsql's case bug? - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: plpgsql's case bug?
Date
Msg-id 162867791003272242u21d6ec43pd24d57d467022d9@mail.gmail.com
Whole thread Raw
In response to Re: plpgsql's case bug?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
>
> It seems odd to require a dummy ELSE clause that does nothing just to
> avoid having an exception thrown, but I'm not sure what else to make
> of the quoted portion of the spec.  What do you think it's saying?
>

I thinking so it designed to be protected before processing CASE
statement without any effect. You can design CASE for some values, and
when is there different value (in runtime), then your an design can be
invalid. So current the design is need some lines more, but is safe.

SQL CASE returns NULL if no expression is executed. PSM CASE raises exception.

Regards
Pavel

> ...Robert
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: plpgsql's case bug?
Next
From: Simon Riggs
Date:
Subject: Re: [COMMITTERS] pgsql: Augment WAL records for btree delete with GetOldestXmin() to