This is a discussion on Generic/Ad-Hoc Select Function within the pgsql Novice forums, part of the PostgreSQL category; --> I am new to Postgresql and was wondering if it is possible to create an ad-hoc select query function, ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| On Saturday 03 June 2006 02:17 pm, "Roy W Bradley" <rbradley@fusiion.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/s...-EXECUTING-DYN ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly |
| ||||
| On Sat, Jun 03, 2006 at 11:17:45 -0700, Roy W Bradley <rbradley@fusiion.com> wrote: > 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? Yes. You should be able to do this in most of not all of the PLs. A good start is to read this: http://developer.postgresql.org/docs...-EXECUTING-DYN ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |