stored queries

From: Joop <root(at)localhost(dot)localdomain(dot)invalid>
To: pgsql-sql(at)postgresql(dot)org
Subject: stored queries
Date: 2003-12-23 09:25:42
Message-ID: pan.2003.12.23.09.23.24.185553@localhost.localdomain.invalid
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello everyone,

I'm just about to start on the reporting part of a PostgreSQL / PHP
application. I think it would be a good idea to create a table in my db in
which I can store queries, something like this:

create table stored_queries (
id bigint primary key,
name varchar,
description varchar,
parameters varchar[][],
query text
);

The frontend to it would present the user with a choice of the NAMEs of
the records, check if PARAMETERs are required (the dimensions would be
name and datatype), if so ask for the parameters and eventually run QUERY
with these parameters.

This approach seems very logical to me, so I think someone must have
invented this weel already :-). I googled for "stored queries" but didn't
find much. I would really like tips, feedback on this approach. Is it a
bad idea, and if so, why? What pitfalls will I run into?

Thanks!

Browse pgsql-sql by date

  From Date Subject
Next Message Markus Bertheau 2003-12-23 10:18:17 Re: restoring database
Previous Message Richard Huxton 2003-12-23 09:22:37 Re: Pgaccess problem on RedhatLinux9