Re: pl/pgsql function not working

From: Darren Ferguson <darren(at)crystalballinc(dot)com>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: Tom Jenkins <tjenkins(at)devis(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: pl/pgsql function not working
Date: 2002-06-19 16:09:56
Message-ID: Pine.LNX.4.44.0206191208540.32349-100000@thread.crystalballinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lee Kindness 2002-06-19 16:12:03 Re: database size
Previous Message Andrew Sullivan 2002-06-19 16:07:31 Re: db grows and grows