You should also consider doing this the other way around and put the data types in the DBIC class definitions.&nbsp; This way you would not need this column_info_for hack.<br><br>--<br>Zbyszek<br><br><div><span class="gmail_quote">
On 8/22/06, <b class="gmail_sendername">Jason Crummack</b> &lt;<a href="mailto:jason.crummack@easysoft.com">jason.crummack@easysoft.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The problem I have is the uppercasing now causes a table I have (old<br>legacy system in which I can't change its name) to fail.<br><br>Previously turning on the quote_char and specifying the correct case in<br>the class definition for the table, all worked well. In the short term
<br>would there be a problem putting a small change into columns_info_for in<br><a href="http://Oracle.pm">Oracle.pm</a> to only uppercase the table name if quote_char is not set?<br><br>Jason<br>Easysoft Limited<br><br><br>
Brandon Black wrote:<br>&gt;<br>&gt;<br>&gt; On 8/21/06, *Jason Crummack* &lt;<a href="mailto:jason.crummack@easysoft.com">jason.crummack@easysoft.com</a><br>&gt; &lt;mailto:<a href="mailto:jason.crummack@easysoft.com">jason.crummack@easysoft.com
</a>&gt;&gt; wrote:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Hi,<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Firstly the current version of Storage/DBI/Oracle.pm won't make<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; test on<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; either Oracle XE or 10.2, the offending line is in columns_info_for, I
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; didn't think $self-&gt;next::method needs to pass $self in the<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; arguments list?<br>&gt;<br>&gt;<br>&gt; Yeah that was a silly error, I've correct that in trunk.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Secondly at Matt's request I've been looking into providing test cases
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; to prove the Oracle layer against case sensitive table names, but<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; unfortunately I'm having problems getting past the<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; columns_info_for code.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; If the table name is case sensitive (or a reserved word) then the
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; uppercase code in columns_info_for (DBI/Oracle.pm) shouldn't be done,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; the table name should be passed to DBD::Oracle as is.<br>&gt;<br>&gt;<br>&gt; Probably true.&nbsp;&nbsp;On the flipside, I think its possible that people have
<br>&gt; been getting away in the past with &quot;CREATE TABLE FOOTABLE&quot; in Oracle<br>&gt; combined with __PACKAGE__-&gt;table('footable') in DBIC, and this uc()<br>&gt; thing was basically a workaround for such sloppiness.&nbsp;&nbsp;It would be
<br>&gt; nice if case-sensitive identifiers were *always* case sensitive, so<br>&gt; that people would never have the opportunity to make such a mistake.<br>&gt; The roots of this issue may run deeper into DBD::Oracle or the client
<br>&gt; library (or the general failure of Oracle users to understand the<br>&gt; exact nature of the Oracle standards for identifier case).<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; The other problem I've seen (which is probably a side effect of the
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; uppercasing) is that the column_info call can return different<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; datasets<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; for the same table, the table I used was the artist table<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; (t/73oracle.t)<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; if column_info runs successfully all column names are returned
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; uppercase<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; and datatypes match initial creation types but if column_info isn't<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; returned and the select * from table where 1 = 0 runs column names are<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; returned in lowercase and certain datatype names are changed (number
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; becomes decimal).<br>&gt;<br>&gt;<br>&gt; I would assume this is a case issue, yes.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; Which drivers use the select * from table where 1=0 code<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; intentionally,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; or is it simply a catch all for failing column_info calls?
<br>&gt;<br>&gt;<br>&gt; It is a catch-all for when colum_info doesn't work (even if it seems<br>&gt; to work but then returns zero rows of information).<br>&gt;<br>&gt; In general, I'd say ignore columns_info_for issues for now, unless its
<br>&gt; really breaking something and the fix is obvious and easy.&nbsp;&nbsp;If things<br>&gt; go as they seem they will with the -current branch, in the upcoming<br>&gt; DBIC 0.08xxx series, it will not be used by default (you'll have to
<br>&gt; ask for it specifically) and will be marked deprecated, and it will<br>&gt; eventually completely go away by 1.0.&nbsp;&nbsp;The functionality will be<br>&gt; subsumed into DBIx::Class::Schema::Loader, which is a more appropriate
<br>&gt; place for the kind of heuristic automagic hackery that is<br>&gt; columns_info_for().<br>&gt;<br>&gt; -- Brandon<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; _______________________________________________
<br>&gt; List: <a href="http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class">http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class</a><br>&gt; Wiki: <a href="http://dbix-class.shadowcatsystems.co.uk/">http://dbix-class.shadowcatsystems.co.uk/
</a><br>&gt; IRC: irc.perl.org#dbix-class<br>&gt; SVN: <a href="http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/">http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/</a><br>&gt; Searchable Archive: <a href="http://www.mail-archive.com/dbix-class@lists.rawmode.org/">
http://www.mail-archive.com/dbix-class@lists.rawmode.org/</a><br><br>_______________________________________________<br>List: <a href="http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class">http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
</a><br>Wiki: <a href="http://dbix-class.shadowcatsystems.co.uk/">http://dbix-class.shadowcatsystems.co.uk/</a><br>IRC: irc.perl.org#dbix-class<br>SVN: <a href="http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/">http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
</a><br>Searchable Archive: <a href="http://www.mail-archive.com/dbix-class@lists.rawmode.org/">http://www.mail-archive.com/dbix-class@lists.rawmode.org/</a><br></blockquote></div><br><br clear="all"><br>-- <br>Zbigniew Lukasiak
<br><a href="http://brudnopis.blogspot.com/">http://brudnopis.blogspot.com/</a>