Re: frustrated by plpgsql procedure - Mailing list pgsql-general

From Tom Lane
Subject Re: frustrated by plpgsql procedure
Date
Msg-id 16520.1143487685@sss.pgh.pa.us
Whole thread Raw
In response to frustrated by plpgsql procedure  (Dino Vliet <dino_vliet@yahoo.com>)
List pgsql-general
Dino Vliet <dino_vliet@yahoo.com> writes:
> I trying for days to get this simple plpgsql procedure
> to run but I keep getting this error:

You can't ordinarily use a variable to supply a table (or field) name
in a plpgsql query; that doesn't work because plpgsql wants to cache a
plan for the query.  A workaround is to build the query as a string
value, then use EXECUTE.

            regards, tom lane

pgsql-general by date:

Previous
From: Bricklen Anderson
Date:
Subject: Re: frustrated by plpgsql procedure
Next
From: "Mark Feller"
Date:
Subject: General advice on database/web applications