Re: A valuable addition to PHP...

From: Andrew Hammond <drew(at)waugh(dot)econ(dot)queensu(dot)ca>
To: Stephen van Egmond <svanegmond(at)bang(dot)dhs(dot)org>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: A valuable addition to PHP...
Date: 2001-03-31 21:16:53
Message-ID: 20010331161653.A14067@waugh.econ.queensu.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-announce pgsql-general pgsql-php

First off, I have to say that I'd never heard of PEAR before, but it looks
like a good database abstraction layer.

On Thu, Mar 29, 2001 at 10:17:44PM -0500, Stephen van Egmond wrote:
> On Thu, Mar 29, 2001 at 05:16:54PM -0500, Andrew Hammond wrote:
> > independant way of accessing metadata. Writing SQL queries that derive
> > metadata by futzing around with the pg_* tables works but is totally
> > non-portable. What I would really like to see is a database interface
> > layer that encapsulates all that nasty mess. Metadata and other
> > introspective stuff is a glaring ommission from SQL.

> IMHO the database "abstraction toolkits" are all missing the point.

You have definately missed my point. The key thing I'm interested in is
META data and introspective abilities. For example, I'm NOT talking about
selecting some data out of a table. I AM talking about getting a list of
databases in the dbm, tables/objects in the database, columns in the table.
That kind of thing. This is interesting because meta-data is exactly what
you need if you want to write meta-programming. Like, say, a generic web /
database interface...

> In my scripts, I want my variables. Now. It failed? Not the concern
> of the script.

How do you intend to deal with runtime error situations? Debugging?

Also, why didn't you use an object oriented approach so you could have
multiple connections to multiple databases?

Aside from those two rather serious issues, your api looks pretty good.
Personally, I'd rename the get_rows function to something like get_table.
get_rows is too close to get_row. I'd be apt to miss the s by accident
and spend a few hours doing blank stare debugging.

In response to

Browse pgsql-announce by date

  From Date Subject
Next Message The Hermit Hacker 2001-04-08 20:08:25 PostgreSQL v7.1 Release Candidate 4
Previous Message IGB.NET 2001-03-30 20:49:55

Browse pgsql-general by date

  From Date Subject
Next Message Markus Mohr 2001-03-31 22:02:19 capitals in fieldnames
Previous Message Eric G. Miller 2001-03-31 19:52:47 Re: function to operate on same fields, different records?

Browse pgsql-php by date

  From Date Subject
Next Message darius 2001-04-01 01:21:25 postgresql array with PHP
Previous Message David Lizano 2001-03-30 11:51:43 Re: A valuable addition to PHP...