Google Answers Logo
View Question
 
Q: CGI program written in Perl so a user can write SQL statements for Postgresql. ( Answered,   0 Comments )
Question  
Subject: CGI program written in Perl so a user can write SQL statements for Postgresql.
Category: Computers > Programming
Asked by: books451-ga
List Price: $15.00
Posted: 12 Aug 2003 21:55 PDT
Expires: 11 Sep 2003 21:55 PDT
Question ID: 244103
I need a Perl program that will handle SQL statements, written by a
user, and return the results, via a web-browser.

I'm using Perl 5.8, DBI/DBD is already installed, should be browser
independent, PostgreSQL also installed.

I'm sure something like this already exists but I'm have trouble
locating it, so I need some help in finding one.

Chris

Request for Question Clarification by webadept-ga on 15 Aug 2003 01:14 PDT
Hi, 

This isn't a problem to create, would take me about an hour to create
a usable script that creates an entry page and a display page for the
query. My question to you is are you sure you want it? If you are
using this as an internal program for an intranet for a few people to
use or only yourself, then that would be okay, but for general public
use, I would strongly suggest not doing it. I can make it as secure as
I can, for instance limiting it to select statments as much as
possible, but I certianly couldn't suggest that it would be completely
secure agaist a malious mind.

Let us know..

thanks, 

webadept-ga

Clarification of Question by books451-ga on 17 Aug 2003 18:15 PDT
Yep I'm sure. It currently is for only one user. I'm going to put it
in a password protected directory. Plus it will be on an intranet with
*no* connection to the Internet.

If it doesn't add too much, put the allowed statements (select,
insert, delete, etc.) in a seperate list so can I modify.

Make the program as "secure" as you feel comfortable considering the
money I'm paying (not much). I'll modify as needed.

Chris

Request for Question Clarification by legolas-ga on 01 Sep 2003 21:10 PDT
There are off-the-shelf PHP solutions that do EXACTLY (and more) what
you want. Would you consider being pointed to the PHP software for
postgresql an acceptable answer? (Software I'd point you to is GPL
licenced)

Legolas-ga

Clarification of Question by books451-ga on 01 Sep 2003 22:56 PDT
No thanks on PHP, for several reasons. 

"Off-the-shelf" tho is what I'm looking for. I know there has to be an
example of using Perl for what I want somewhere on the Internet,,,
just can't find it.

Chris

Request for Question Clarification by legolas-ga on 02 Sep 2003 08:30 PDT
Actually, I just remembered a PERL PostrgreSQL 'off-the-shelf' product
that will do what you want. It's part of a larger suite of admin utils
that are written in PERL. I'm assuming that it will fit the bill for
you--installation is a snap (there's an install script that does all
the setup for you).

You can create a user that ONLY has access to the postgresql
interface.

Let me know if this is ok..

Legolas-ga

Clarification of Question by books451-ga on 02 Sep 2003 14:48 PDT
Sounds like a winner.

Chris
Answer  
Subject: Re: CGI program written in Perl so a user can write SQL statements for Postgresql.
Answered By: legolas-ga on 02 Sep 2003 17:06 PDT
 
Hi books451-ga,

The software that I was referring to is called "Webmin". It includes
TONS of admin utils--including one for PostgreSQL. I use it myself and
find it to be invaluable in adminstrating Linux boxes.

You can find webmin here:
http://www.webmin.com/

There is an RPM or tar.gz download available. Of course, if you have
an RPM system, go for the RPM :)  Otherwise, grab the tar.gz file.
Installation is a breeze and instructions can be found here:
http://www.webmin.com/download.html

Typically, by default to connect to the webmin util once installed,
you simply point your browser to http://localhost:10000  (replacing
localhost with whatever your host name is). You can add a new user and
give them ONLY permission to use the Postgresql interface within
webmin. You can also 'execute SQL' statement from directly within the
utility (among other things).

If you have any issues with the software, feel free to ask for
clarification prior to rating and closing this question.

Thanks,

Legolas-ga

No search done: this software is known to me as I use it on all my
servers!
Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy