Re: Generic/Ad-Hoc Select Function

From: Terry Lee Tucker <terry(at)esc1(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Generic/Ad-Hoc Select Function
Date: 2006-06-03 19:08:55
Message-ID: 200606031508.55484.terry@esc1.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Saturday 03 June 2006 02:17 pm, "Roy W Bradley" <rbradley(at)fusiion(dot)com> thus
communicated:
--> I am new to Postgresql and was wondering if it is possible to create an
ad-hoc select query function, where the table name, and the where clause
were passed to the function and it returned a result set for the table? -->
--> Thanks
--> Roy
-->

You can generate dynamic SELECT statements. See the docs at:
http://www.postgresql.org/docs/8.1/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Bruno Wolff III 2006-06-04 00:12:07 Re: Generic/Ad-Hoc Select Function
Previous Message Roy W Bradley 2006-06-03 18:17:45 Generic/Ad-Hoc Select Function