Re: deleting function

From: pavunkumar <pavun(dot)bks(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: deleting function
Date: 2009-04-25 03:19:37
Message-ID: 1e5ca0ef-7e46-401e-b7d5-897cd22eb08f@i28g2000prd.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Apr 24, 8:55 pm, t(dot)(dot)(dot)(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane) wrote:
> pavunkumar <pavun(dot)(dot)(dot)(dot)(at)gmail(dot)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.
>
> regards, tom lane
>
> --
> Sent via pgsql-general mailing list (pgsql-gene(dot)(dot)(dot)(at)postgresql(dot)org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-general

Dear Friend

Whatever your saying right , But why the function
not saying error.... ?
that is my doubt... this is what I want to
clarify....!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2009-04-25 07:18:16 Re: deleting function
Previous Message Alvaro Herrera 2009-04-25 00:51:17 Re: delete duplicates takes too long