-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
> I was really just looking for any future planning done on the DBI side
> of things to aid with getting back full information. Either a flag to
> pass into the function call, or new functions which return the table
> names prefixed as you would see when running the SQL directly from a
> console.
Where are you seeing such a thing? I think this "problem" is out of
the reach of a DBI solution. Databases return whatever you've specified
in the SELECT list: if using '*', it returns the column names by default,
but is under no compunction to return the table name as well. Thus, even
if you manage to convince us to add a flag to the DBI API, there is no way
for some (most?) drivers to extract that information anyway. Consider:
postgres=# create table f1(a int);
CREATE TABLE
postgres=# create table f2(a int);
CREATE TABLE
postgres=# insert into f1 values (1);
INSERT 0 1
postgres=# insert into f2 values (2);
INSERT 0 1
postgres=# select *, f1.*, f2.*, 3 as a from f1, f2;
a | a | a | a | a
- ---+---+---+---+---
1 | 2 | 1 | 2 | 3
(1 row)
mysql> create table f1(a int);
Query OK, 0 rows affected (0.00 sec)
mysql> create table f2(a int);
Query OK, 0 rows affected (0.00 sec)
mysql> insert into f1 values (1);
Query OK, 1 row affected (0.00 sec)
mysql> insert into f2 values (2);
Query OK, 1 row affected (0.00 sec)
mysql> select *,f1.*, f2.*, 3 as a from f1, f2;
+------+------+------+------+---+
| a | a | a | a | a |
+------+------+------+------+---+
| 1 | 2 | 1 | 2 | 3 |
+------+------+------+------+---+
1 row in set (0.00 sec)
There are plenty of other non-DBI solutions available to you, the
primary one being having your app not rely on such a solution. Another
is creating specific aliases if you need things returned with
specific names, like so:
postgres=# select f1.a as "f1.a", f2.a as "f2.a", 3 as a from f1, f2;
f1.a | f2.a | a
- ------+------+---
1 | 2 | 3
(1 row)
- --
Greg Sabino Mullane [email protected]
End Point Corporation
PGP Key: 0x14964AC8 200908120608
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iEYEAREDAAYFAkqClmcACgkQvJuQZxSWSsh/BgCg2tz/JIY/tykZF2i3ORJjtirw
0OAAnRJ/agRNVbU9AuMILgEChIB9PnZH
=ZXrc
-----END PGP SIGNATURE-----