Re: Semi-customized queries? Subset of SQL? Accessing the parser? Injection?

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Semi-customized queries? Subset of SQL? Accessing the parser? Injection?
Date: 2008-11-04 19:35:54
Message-ID: 20081104193554.GR2459@frubble.xen.chris-lamb.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Nov 04, 2008 at 11:12:05AM -0800, Webb Sprague wrote:
> > If they're that smart, they're smart enough to deal with SQL, and
> > likely to be frustrated by a like-sql-but-not command language or
> > a GUI query designer.
> >
> > Instead, create a user that only has enough access to read data (and
> > maybe create temporary tables) and use that user to give them
> > a sql commandline.
> >
> > It'll be drastically less development effort for you, and the end result
> > is less likely to frustrate your users.
>
> Can't do that. (Or I wouldn't have asked the question.) Need a WWW
> interface, period.

Why not just write a web interface that accepts SQL and renders the
results into an HTML table? If you wanted to pretty it up a bit, you
could write an AJAX ditty to present a nice GUI query builder for those
that want it.

The fun thing, in my eyes, would be to sit down and define a new DSL
that exposes some subset of SQL that you're interested in. Once you've
learnt about parsing and lexing, transforming the result into SQL will
be easy. Coming up with an appropriately specific language would be a
good research project for someone, it'd be interesting to see how much
better than SQL it could be. You should be able to get the language a
bit more regular and tidy, but it would be interesting to see what your
users thought.

Sam

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steve Atkins 2008-11-04 19:36:15 Re: Semi-customized queries? Subset of SQL? Accessing the parser? Injection?
Previous Message David Wilson 2008-11-04 19:31:54 Re: Semi-customized queries? Subset of SQL? Accessing the parser? Injection?