Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Patches > Re: plpgsql CAS...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 3677 of 3861
Post > Topic >>

Re: plpgsql CASE statement - last version

by pavel.stehule@[EMAIL PROTECTED] ("Pavel Stehule") May 3, 2008 at 10:12 AM

Hello

2008/5/3 Tom Lane <tgl@[EMAIL PROTECTED]
>:
> "Pavel Stehule" <pavel.stehule@[EMAIL PROTECTED]
> writes:
>> 2008/5/2 Heikki Linnakangas <heikki@[EMAIL PROTECTED]
>:
>>> How about taking a completely different strategy, and implement the
>>> CASE-WHEN construct fully natively in plpgsql, instead of trying to
convert
>>> it to a single SQL CASE-WHEN expression? It's not a very good match
anyway;
>
>> It was first variant. It's  simpler for parsing and slower for
>> execution :(. It means more than once expression evaluation and for
>> simple case value casting and comparation.
>
> I agree with Heikki: this patch is seriously ugly, and "slower for
> execution" isn't a good enough reason for saddling us with having
> to maintain such a kluge in the parser.
>
> I don't really see why you should need to have multiple expression
> evaluations, anyhow.  Can't you evaluate the test expression once
> and inject its value into the comparisons using CaseTestExpr,
> the same way the core CASE-expression code works?
>
>

I have to look on this way.

Regards
Pavel Stehule

                   regards, tom lane
>

-- 
Sent via pgsql-patches mailing list (pgsql-patches@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches




 2 Posts in Topic:
Re: plpgsql CASE statement - last version
pavel.stehule@[EMAIL PROT  2008-05-03 10:12:13 
Re: plpgsql CASE statement - last version
tgl@[EMAIL PROTECTED] (T  2008-05-15 18:46:34 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Fri Jul 4 9:31:56 CDT 2008.