Re: from string to table...?

From: will trillich <will(at)serensoft(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: from string to table...?
Date: 2001-03-23 16:41:46
Message-ID: 20010323104145.B20101@mail.serensoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message will trillich 2001-03-23 16:55:27 Re: internationalizing text
Previous Message will trillich 2001-03-23 16:39:02 Re: Re: Rules, views, sequences and returned values