Re: [GENERAL] problem with FOUND and EXECUTE in pl/pgsql

2009-06-03 Thread Pavel Stehule
2009/6/4 Oleg Bartunov : > On Wed, 3 Jun 2009, Tom Lane wrote: > >> Oleg Bartunov writes: >>> >>> seems I don't understand how FOUND variable in pl/pgsql function defined, >>> when I use EXECUTE of PERFORM. There is no problem when I use plain SQL. >> >> EXECUTE doesn't affect FOUND, even if the s

Re: [GENERAL] problem with FOUND and EXECUTE in pl/pgsql

2009-06-03 Thread Oleg Bartunov
On Wed, 3 Jun 2009, Tom Lane wrote: Oleg Bartunov writes: seems I don't understand how FOUND variable in pl/pgsql function defined, when I use EXECUTE of PERFORM. There is no problem when I use plain SQL. EXECUTE doesn't affect FOUND, even if the statement-to-be-executed would have. There's

Re: [GENERAL] problem with FOUND and EXECUTE in pl/pgsql

2009-06-03 Thread Tom Lane
Oleg Bartunov writes: > seems I don't understand how FOUND variable in pl/pgsql function defined, > when I use EXECUTE of PERFORM. There is no problem when I use plain SQL. EXECUTE doesn't affect FOUND, even if the statement-to-be-executed would have. There's been some discussion about changing

Re: [GENERAL] problem with FOUND and EXECUTE in pl/pgsql

2009-06-03 Thread Ries van Twisk
Are you not confused somewhere?? First you insert INSERT INTO db VALUES(1,'one'); Then you do this : SELECT merge_db(1, 'two'); But for some reason this SQL select * from db; selects two for your text field... Ries On Jun 3, 2009, at 2:42 PM, Oleg Bartunov wrote: Hi there, seems I don