Dear Friends I have table called below I need to delete the record by using id value of the table For that I wrote below function create or replace function newd(id integer ) returns void as $$ begin delete from testing where id=$1; end; $$ language 'plpgsql'; Here I call the function as " select newd(100) " But it is deleting every things from the table My doubt is , why it was deleting every thing , even I gave the single value in function . pavunkumar=> \d testing; Table "hospital.testing" Column | Type | Modifiers ---------+-------------------+----------- id | integer | not null name | character varying | address | character varying | Indexes: "testing_pkey" PRIMARY KEY, btree (id) -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general