Re: pl/pgsql function not working - Mailing list pgsql-general

From Darren Ferguson
Subject Re: pl/pgsql function not working
Date
Msg-id Pine.LNX.4.44.0206191208540.32349-100000@thread.crystalballinc.com
Whole thread Raw
In response to Re: pl/pgsql function not working  (Richard Huxton <dev@archonet.com>)
List pgsql-general
Perform doesn't work that way from my experience

Use the following

EXECUTE ''UPDATE ''||obj.relname||'' SET lastaccess = NULL'';

The % you are using is generally used in the RAISE NOTICE OR EXCEPTION
pieces

HTH

Darren Ferguson

On Wed, 19 Jun 2002, Richard Huxton wrote:

> On Wednesday 19 Jun 2002 2:25 pm, Tom Jenkins wrote:
> > hello all,
> > i hope somebody can shed some light on a problem i'm having with
> > pl/pgsql.
>
> >     PERFORM ''update % set lastaccess = NULL;'', obj.relname  ;
>
> Are you sure this shouldn't be EXECUTE (build the sql-string normally first)
>
> - Richard Huxton
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

--
Darren Ferguson


pgsql-general by date:

Previous
From: Masaru Sugawara
Date:
Subject: Re: pl/pgsql function not working
Next
From: Andrew Sullivan
Date:
Subject: Re: db grows and grows