On 28/04/2009 10:56, Jasen Betts wrote:
> would this:
>
> delete from testing where "id"=$1;
>
> be safe?
No - you haven't really changed anything - the double-quotes just
prevent Postgres folding mixed/upper-case identifiers to lower-case.
Why not just change the name of the argument as othe
On 2009-04-24, Tom Lane wrote:
> pavunkumar 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 nam
On Fri, Apr 24, 2009 at 08:19:37PM -0700, pavunkumar wrote:
> On Apr 24, 8:55 pm, t...@sss.pgh.pa.us (Tom Lane) wrote:
> > 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 everyt
On Fri, Apr 24, 2009 at 12:15 PM, Sam Mason wrote:
> On Fri, Apr 24, 2009 at 11:55:48AM -0400, Tom Lane wrote:
>> pavunkumar writes:
>> > create or replace function newd(id integer ) returns void as $$
>> > delete from testing where id=$1;
>>
>> Don't use the same name for a parameter as you use
On Apr 25, 2009, at 5:19 AM, pavunkumar wrote:
Dear Friend
Whatever your saying right , But why the function
not saying error ?
that is my doubt... this is what I want to
clarify!
Because it's a valid comparison, just not the one you wanted.
Alban
On Apr 24, 8:55 pm, t...@sss.pgh.pa.us (Tom Lane) wrote:
> pavunkumar writes:
> > create or replace function newd(id integer ) returns void as $$
>
> ^^> begin
> > delete from testing where id=$1;
>
> ^^
>
> > end;
> > $$
> > language '
On 24/04/2009 14:03, pavunkumar wrote:
> create or replace function newd(id integer ) returns void as $$
> begin
> delete from testing where id=$1;
> end;
I'd guess it's because the column name, "id", is the same as the
argument name - plpgsql thinks that "id" in the DELETE statement is the
argume
pavunkumar 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 colu
On Fri, Apr 24, 2009 at 11:55:48AM -0400, Tom Lane wrote:
> pavunkumar writes:
> > create or replace function newd(id integer ) returns void as $$
> > delete from testing where id=$1;
>
> Don't use the same name for a parameter as you use for a table column
> referenced in the function.
I've fou
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 " selec
On Tue, Mar 28, 2006 at 02:58:45PM +0200, Gevik Babakhani wrote:
> Hello Folks,
>
> I would like to know if deleting functions from pg_catalog.pg_proc with
> the following SQL statement is advisable?
Offhand I think you're going to run into problem like the dependancies
not being removed which co
Hello Folks,
I would like to know if deleting functions from pg_catalog.pg_proc with
the following SQL statement is advisable?
I would like a way of deleting my functions without using the DROP
FUNCTION statement.
--
delete from pg_
12 matches
Mail list logo