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 a,

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

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 it to a single SQL

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

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 right. me too.

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 very good

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 get a complain

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 lexer. It's only little

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: Hello I found

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]: On Sat, Apr 5,

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 arguments

[PATCHES] plpgsql CASE statement - last version

2008-04-05 Thread Pavel Stehule
Hello I found some bugs when I used base_lexer, so I returned back own lexer. It's only little bit longer, but simpler. Regards Pavel Stehule *** ./doc/src/sgml/plpgsql.sgml.orig 2008-04-04 12:07:12.0 +0200 --- ./doc/src/sgml/plpgsql.sgml 2008-04-04 21:55:08.0 +0200