Re: best way for export gram.y symbols - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: best way for export gram.y symbols
Date
Msg-id 162867790804032243r7078d8fanc8450c3ab8196224@mail.gmail.com
Whole thread Raw
In response to Re: best way for export gram.y symbols  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 03/04/2008, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Pavel Stehule" <pavel.stehule@gmail.com> writes:
>  >> What exactly are you trying to accomplish?
>
>  > when I build CASE expression, I have to merge some PLpgSQL_expr
>  > together. Then I have to reparse expr->query and I have to find params
>  > and actualize it.
>
>  There has to be a better way than that.  What CASE syntax are you
>  trying to implement, anyhow?


CASE expr
  WHEN expr [,expr[,...]] THEN
    statements list
END CASE;

CASE
  WHEN expr THEN
    statements list
  WHEN ....
END CASE;

I would to remove repeated evaluation and casting. Transformation to
SQL case statement is simply and fast. I had to add one file to
plpgsql code, but I haven't any redundant  code and code is readable
and simple. But any ideas are welcome.

Current patch is in attachment

>
>                         regards, tom lane
>

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] ANALYZE getting dead tuple count hopelessly wrong
Next
From: "Pavan Deolasee"
Date:
Subject: Re: [GENERAL] ANALYZE getting dead tuple count hopelessly wrong