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

2009-06-03 Thread Oleg Bartunov
Hi there, 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. Below is a test I did for 8.4beta2. This is simplified script and I can use plain SQL, but in my project I need EXECUTE. CREATE TABLE db

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

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

2009-06-03 Thread Tom Lane
Oleg Bartunov o...@sai.msu.su 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

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 o...@sai.msu.su 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

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

2009-06-03 Thread Pavel Stehule
2009/6/4 Oleg Bartunov o...@sai.msu.su: On Wed, 3 Jun 2009, Tom Lane wrote: Oleg Bartunov o...@sai.msu.su 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,