Re: plpgsql's case bug?

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: plpgsql's case bug?
Date: 2010-03-28 05:42:03
Message-ID: 162867791003272242u21d6ec43pd24d57d467022d9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-03-28 08:52:44 Re: [COMMITTERS] pgsql: Augment WAL records for btree delete with GetOldestXmin() to
Previous Message Tom Lane 2010-03-28 05:21:26 Re: plpgsql's case bug?