Re: [PATCHES] plpgsql CASE statement - last version

2008-05-15 Thread Tom Lane
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > I am sending little bit smarter version - without redundant parsing. Applied with corrections --- you had some memory management problems in particular. One thing that I think might annoy people is that you've handled CASE x WHEN

Re: [PATCHES] plpgsql CASE statement - last version

2008-05-07 Thread Pavel Stehule
Hello I am sending little bit smarter version - without redundant parsing. When test expression is defined, then expressions in WHEN part are modified like $x in ( origin_expression ) $x is referenced to invisible *case* variable that carries result of test expression. Regards Pavel Stehule 2

Re: [PATCHES] plpgsql CASE statement - last version

2008-05-03 Thread Pavel Stehule
Hello 2008/5/3 Tom Lane <[EMAIL PROTECTED]>: > "Pavel Stehule" <[EMAIL PROTECTED]> writes: >> 2008/5/2 Heikki Linnakangas <[EMAIL PROTECTED]>: >>> How about taking a completely different strategy, and implement the >>> CASE-WHEN construct fully natively in plpgsql, instead of trying to convert >>>

Re: [PATCHES] plpgsql CASE statement - last version

2008-05-02 Thread Tom Lane
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > 2008/5/2 Heikki Linnakangas <[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

Re: [PATCHES] plpgsql CASE statement - last version

2008-05-02 Thread Pavel Stehule
Hello 2008/5/2 Heikki Linnakangas <[EMAIL PROTECTED]>: > Pavel Stehule wrote: >> >> Hello >> >> I found some bugs when I used base_lexer, so I returned back own >> lexer. It's only little bit longer, but simpler. > > Hmm. I don't like having to lex the expressions again. It just doesn't feel > rig

Re: [PATCHES] plpgsql CASE statement - last version

2008-05-02 Thread Heikki Linnakangas
Pavel Stehule wrote: Hello I found some bugs when I used base_lexer, so I returned back own lexer. It's only little bit longer, but simpler. Hmm. I don't like having to lex the expressions again. It just doesn't feel right. How about taking a completely different strategy, and implement the

Re: [PATCHES] plpgsql CASE statement - last version

2008-05-01 Thread Jaime Casanova
On Sat, Apr 5, 2008 at 6:57 AM, Pavel Stehule <[EMAIL PROTECTED]> wrote: > Hello > > I found some bugs when I used base_lexer, so I returned back own > lexer. It's only little bit longer, but simpler. > you really compile this one? i get a complain because read_sql_construct is called with 8 argum

Re: [PATCHES] plpgsql CASE statement - last version

2008-05-01 Thread Jaime Casanova
On Thu, May 1, 2008 at 8:14 AM, Jaime Casanova <[EMAIL PROTECTED]> wrote: > > On Thu, May 1, 2008 at 8:11 AM, Jaime Casanova <[EMAIL PROTECTED]> wrote: > > On Thu, May 1, 2008 at 7:59 AM, Pavel Stehule <[EMAIL PROTECTED]> wrote: > > > Hello > > > > > > 2008/5/1 Jaime Casanova <[EMAIL PROTECTED]>: >

Re: [PATCHES] plpgsql CASE statement - last version

2008-05-01 Thread Jaime Casanova
On Thu, May 1, 2008 at 8:11 AM, Jaime Casanova <[EMAIL PROTECTED]> wrote: > On Thu, May 1, 2008 at 7:59 AM, Pavel Stehule <[EMAIL PROTECTED]> wrote: > > Hello > > > > 2008/5/1 Jaime Casanova <[EMAIL PROTECTED]>: > > > On Sat, Apr 5, 2008 at 6:57 AM, Pavel Stehule <[EMAIL PROTECTED]> wrote: > > >> H

Re: [PATCHES] plpgsql CASE statement - last version

2008-05-01 Thread Jaime Casanova
On Thu, May 1, 2008 at 7:59 AM, Pavel Stehule <[EMAIL PROTECTED]> wrote: > Hello > > 2008/5/1 Jaime Casanova <[EMAIL PROTECTED]>: > > On Sat, Apr 5, 2008 at 6:57 AM, Pavel Stehule <[EMAIL PROTECTED]> wrote: > >> Hello > >> > >> I found some bugs when I used base_lexer, so I returned back own > >> l

Re: [PATCHES] plpgsql CASE statement - last version

2008-05-01 Thread Pavel Stehule
Hello 2008/5/1 Jaime Casanova <[EMAIL PROTECTED]>: > On Sat, Apr 5, 2008 at 6:57 AM, Pavel Stehule <[EMAIL PROTECTED]> wrote: >> Hello >> >> I found some bugs when I used base_lexer, so I returned back own >> lexer. It's only little bit longer, but simpler. >> > > you really compile this one? i ge