On Fri, Mar 23, 2001 at 07:53:39AM +0000, Richard Huxton wrote:
> will trillich wrote:
> > is there a way to write sql/plpgsql that'll take a varchar
> > argument (table and field names) and be able to turn it into the
> > appropriate query?
>
> You can use the "EXECUTE" statement in plpgsql (v7.1) to dynamically
> build a query. The catch is you can't return rows from a function. You
> could use it to build a view and then query that.
>
> Probably easiest to do in the application layer though.
<blank stare> um, what's "application layer" mean? :)
--
will(at)serensoft(dot)com
http://newbieDoc.sourceforge.net/ -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!