Re: proposal for 8.4: PL/pgSQL - statement CASE - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: proposal for 8.4: PL/pgSQL - statement CASE
Date
Msg-id 162867790801170819s588c25cfl2653fc8036bf8111@mail.gmail.com
Whole thread Raw
In response to Re: proposal for 8.4: PL/pgSQL - statement CASE  (Josh Berkus <josh@agliodbs.com>)
Responses Re: proposal for 8.4: PL/pgSQL - statement CASE  ("Brendan Jurd" <direvus@gmail.com>)
List pgsql-hackers
Hello

>
> Isn't there a danger of syntactical conflict with the SQL SELECT ... CASE
> statement?
>

no, isn't. SELECT CASE can be only in expression .. inside SQL
statement, but PL/SQL CASE is PL statement. These are two different
worlds. SELECT CASE is invisible for pl parser, because pl parser
solves statements, not expressions.

> I'd love to have CASE in PL/pgSQL, but I always thought that stood in the way.
>

it's safe. SQL/PSM use it too.

Pavel


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: proposal for 8.4: PL/pgSQL - statement CASE
Next
From: "Pavel Stehule"
Date:
Subject: Re: proposal for 8.4: PL/pgSQL - statement CASE