Ron Savage is working on Oracle support for Rose::DB.  He's currently
implicitly setting the schema() to the username(), but I'm not sure that's
such a great idea.  Where we run into problems is in the list_tables()
method where the schema arg apparently can't be left blank:

    $dbh->table_info($self->catalog, $self->schema, '%', $types);

Here's what the DBD::Oracle documentation has to say on the topic:

> In Oracle, the concept of user and schema is (currently) the same. Because
> database objects are owned by an user, the owner names in the data dictionary
> views correspond to schema names. Oracle does not support catalogs so
> TABLE_CAT is ignored as selection criterion.

Hm, okay, but I'm still not entirely comfortable with setting schema() to
username() thanks to that little "(currently)" bit.  Anyway, back to
list_tables().  The docs say:

> Search patterns are supported for TABLE_SCHEM and TABLE_NAME.

So I think I'd prefer this:

    $dbh->table_info($self->catalog, '%', '%', $types);

which is how list_tables() is supposed to work.  That is, it may be limited
by schema, but should not be limited by username.  But since schema and
username are apparently synonymous in Oracle, I'm not sure which behavior is
best.

If we are forced to pass something for the schema arg, I think I might try
to get away with:

    $dbh->table_info($self->catalog, $self->username, '%', $types);

Any Oracle experts have an opinion?

-John




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to