Re: a bug in plpgsql
От | Jaime Casanova |
---|---|
Тема | Re: a bug in plpgsql |
Дата | |
Msg-id | 20041104195043.99501.qmail@web50002.mail.yahoo.com обсуждение исходный текст |
Ответ на | Re: a bug in plpgsql (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: a bug in plpgsql
|
Список | pgsql-bugs |
--- Tom Lane <tgl@sss.pgh.pa.us> escribió: > Jaime Casanova <systemguards@yahoo.com> writes: > > CASE rs_dtran.fpg_codigo > > WHEN ''EF'' THEN > > IF rs_ttran.tra_tipo = ''+'' THEN > > valor_ef := valor_ef + rs_dtran.dtr_valor; > > ELSE > > valor_ef := valor_ef - rs_dtran.dtr_valor; > > END IF; > > WHEN ''CH'' THEN > > IF rs_ttran.tra_tipo = ''+'' THEN > > valor_ch := valor_ch + rs_dtran.dtr_valor; > > ELSE > > valor_ch := valor_ch - rs_dtran.dtr_valor; > > END IF; > > END; > > > but in that line there is a valid IF .. THEN .. > ELSE > > block. > > if/then/else is a statement, not a component of an > expression. > CASE is an expression construct, not a statement. I > think > you need to rewrite the CASE as an if/then/elsif > statement. > > regards, tom lane > I will try but this work in v7.4.2 that's why i think is an error. regards, Jaime Casanova _________________________________________________________ Do You Yahoo!? Información de Estados Unidos y América Latina, en Yahoo! Noticias. Visítanos en http://noticias.espanol.yahoo.com
В списке pgsql-bugs по дате отправления: