> pg_result_seek() should perform a similar function. In most cases 
> you wouldn't need to use that because if you're going to be using 
> the results more than once you could store them in an array.

Sometimes yes, sometimes no.  But a valid point nonetheless.

> > * For PGSQL, you can get the database name, the field name
> > even the *host name* but you can't get the table name from a
> > particular query?
> Not sure what you're getting at here. Surely for any particular 
> query, _you_ would know what table(s) is/are being used?

That's not necessarily true.  Certainly not if you are using an
abstraction layer to access the database.  Take PEAR for example.
When instantiation on object, you give it the relevant connection
information (user, pw, host and perhaps a dbname that may or may
not be the dbname that gets queried later on).  So sure, you can
access those member variables (except maybe dbname; I don't think
that gets stored) which is also information you can get 
programatically using built in functions.  But let's say you pass
a query to the query() method that doesn't use the dbname that
you used when instantiating the object.  That's certainly valid.
But now, there's no way (ok, there's a way but it isn't necessarily
accurate) to get the dbname for the query that was just run... apart from
requiring the programmer to pass the dbname as another paramter 
to the query() method   You can do this in mysql.  I just don't know 
why you can't do this in pgsql.

Chris

Reply via email to