On 2009-04-24, Tom Lane <t...@sss.pgh.pa.us> wrote: > pavunkumar <pavun....@gmail.com> writes: >> create or replace function newd(id integer ) returns void as $$ > ^^ >> begin >> delete from testing where id=$1; > ^^ >> end; >> $$ >> language 'plpgsql'; > > Don't use the same name for a parameter as you use for a table column > referenced in the function. The above is equivalent to > "delete... where $1=$1", ie, delete everything.
would this: delete from testing where "id"=$1; be safe? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general