Segregated the problematic portion, and showing for your view here.,
- Following is the function definition,
create or replace function new_del(id integer) returns void as $$
begin
raise info 'dollar :%',$1;
delete from testing where id=$1;
end ;
$$
language 'plpgsql';
- following is the table "testing" contains,
SELECT * from testing ;
id
-----
101
102
103
(3 rows)
- When i call the function as
SELECT new_del('101');
INFO: dollar :101
new_del
---------
(1 row)
It deletes all the rows ! Why it is doing like this !
- But when i change the name of the argument then the function behaves normally.
I changed the argument name "id" to id_field it behaved normally and deletes only the specified row.
Any help is appreciated.