Re: Web-based PSQL?
I've now developed a basic web-based interface to psql (CGI in PERL). It is
quite basic, and at the moment does not report errors from psql properly,
but it could be quite handy in some circumstances. I've no doubt there are
better ways of doing a number of things in it, too!
Of course, allowing this sort of access is potentially very dangerous. It
does offer IP-based security, as well as a username/password combination for
your database, but if you have trust relationships set up for your
webserver, be careful! I take no responsibility for any security problems
this may allow, or indeed any other problems with the script at all!
Comments are welcome, but I have run out of time for this kind of thing for
the moment, so anything other than minor changes people want me to implement
may take a while. You are free to mangle the script yourselves as much as
you like, as long as I'm credited in the script itself.
You can find it at http://users.ox.ac.uk/~cerberus/psql.pl
Yours,
Moray
----------------------------------------------------------------
Moray.McConnachie@computing-services.oxford.ac.uk
----- Original Message -----
From: "Philip Poles" <philip@surfen.com>
To: "Moray McConnachie" <moray.mcconnachie@computing-services.oxford.ac.uk>
Cc: <pgsql-general@postgresql.org>
Sent: Wednesday, March 29, 2000 5:20 PM
Subject: Re: [GENERAL] Web-based PSQL?
That's a nice looking interface...
I was wondering if anyone has managed to get it to work with the 7.0betas?
I find that I can connect OK to a 6.5.3 db...in read-only mode, at any
rate.
When I try to connect to a 7.0b3 db, I get back the message: The selected
database is not a PostgreSQL v6.5.x system!
I assume (dangerous word, I know) that this has to do with the psqlODBC
driver...has anyone else run into this problem ? does anyone know a work
around...or even if there is a compiled version of the driver that works
with
v7.x?
Thanx,
-philip
----- Original Message -----
From: Moray McConnachie
<moray.mcconnachie@computing-services.oxford.ac.uk>
Show quoted text
To: Stan Jacobs <jacobs@jtek.com>; Egon Schmid <eschmid@s.netic.de>
Cc: <pgsql-general@postgresql.org>
Sent: Wednesday, March 29, 2000 5:55 AM
Subject: Re: [GENERAL] Web-based PSQL?Whoops, gave wrong URL: pgadmin should be
http://www.vale-it.demon.co.uk/freeware/pgadmin/
----------------------------------------------------------------
Moray.McConnachie@computing-services.oxford.ac.uk
----- Original Message -----
From: "Stan Jacobs" <jacobs@jtek.com>
To: "Egon Schmid" <eschmid@s.netic.de>
Cc: <pgsql-general@postgresql.org>
Sent: Wednesday, March 29, 2000 9:33 AM
Subject: Re: [GENERAL] Web-based PSQL?I know this has a standard SQL interface, but I was wondering if there was
an existing web app that let you show schemas, create tables, edit data,
and all of that from one simple interface. Does PHP provide this? Sorry
for my confusing question. :-)On Wed, 29 Mar 2000, Egon Schmid wrote:
Stan Jacobs wrote:
is there a version of psql that runs via web interface? It seems like
it
would be rather trivial to build if it doesn't already exist, right?
(And
generally, at least to me, "trivial" means someone's already done it.
*smile*)PHP: http://www.php.net/ http://www.php.net/version4
http://www.zend.com/-Egon
--
Six Offene Systeme GmbH. Stuttgart - Berlin - New York.
Fon +49 711 9 90 91 64 � Fax +49 711 9 90 91 99 � http://www.six.de/
Import Notes
Reference msg id not found: Pine.LNX.4.05.10003290031170.27439-100000@crease.jtek.comReference msg id not found: 012401bf996d$4028bd80$760e01a3@oucs.ox.ac.ukReference msg id not found: 00ec01bf999a$a1cea130$26ab6bcf@surfen.com
Hello Stan,
On 29-Mar-00 06:33:32, you wrote:
I know this has a standard SQL interface, but I was wondering if there was
an existing web app that let you show schemas, create tables, edit data,
and all of that from one simple interface. Does PHP provide this? Sorry
for my confusing question. :-)
PHP is a language that provides native interface with many DBMS including
PostgreSQL. PHP is also very suitable for Web applications, as a matter of
fact it's its most proeminent use.
I think there is a phpPostgreSQLAdmin program somewhere similar to
phpMyAdmin for MySQL that does what you need.
Personally I don't use such programs, not because they are not good, but
because like most Web developers I have a development environment in my
development machine and a production environment in online.
When I develop I often need to change database schemas, like
adding/removing/renaming tables/fields/indexes/sequences etc.. So, when I
move to the production environment the just tested development code that
uses an eventually upgraded database schema, I need to have the production
database schema updated to work with that new code.
To solve these and other development problems I developed a PHP package
named Metabase that is available here:
http://phpclasses.UpperDesign.com/browse.html/package/20
Metabase is DBMS independent package to access and manage SQL based
database servers using PHP. You may think of it as a DBI-DBD like package
for PHP but in fact it is much more than that.
It comes with parser class that is able to process DBMS independent
descriptions of database schemas (tables, fields, indexes, sequences)
defined in a custom XML format. There is a manager class that it is able
to process the data returned by the parser class and install the described
schemas using the interface class. The interface class provides a single
API that uses DBMS specific driver classes to provide DBMS independency.
The really cool part of the manager class is that it is able to take two
versions of a database schema, the currently installed and the one you want
to upgrade to, and extract the list of differences between them
(added/removed/renamed tables/fields/indexes/sequences). With that list it
is able to apply the changes in the installed database without disturbing the
data that was stored in the database since it was installed for the first
time or since it was updated for the last time.
The good part is that Metabase is available for free with several DBMS
specific driver classes including PostgreSQL which is in a very solid
state. There are other drivers in a solid state like MySQL and Oracle and
some other in development which will be made available soon. I developed
this package but other developers may contribute with drivers for other
DBMS.
Metabase provides many other interesting abstracted services, like
selecting the range of rows that will are returned by SELECT queries like
using the LIMIT keyword but in a way that works with any capable DBMS, and
also the ability to move data between distinct DBMS, eventually of
different vendors, without loosing data.
There are many other features that are documented in the user manual that
is available in the page listed above. In this page you will also find a
tutorial document to get you started quickly with Metabase and well all the
drivers and other package classes.
Enjoy,
Manuel Lemos
Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org
--
E-mail: mlemos@acm.org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--
Import Notes
Reply to msg id not found: Pine.LNX.4.05.10003290031170.27439-100000@crease.jtek.com | Resolved by subject fallback