From: Dave B. <db...@pc...> - 2005-01-28 20:38:55
|
Hey Folks, OK a few thoughts on the Postgres issue. Here at CBIL, we don't have a good platform for testing the Postgres implementation of the WDK. (Indeed, it is all we can do to handle Oracle!) We are thrilled that other groups are working on it and encourage them to continue to do so, in the spirit of collaboration and getting results. However, we think it is best if the extent of Postgres changes is limited to the file org.gusdb.wdk.model.implementation.PostgreSQL.java. The reason I mention this is that the BiowebDB team has sent out their fix for the Postgres bugs, but this fix has been applied to the ResultFactory class, as well as some of the wdk executables. These other files are intended to be platform independent, and modifying them may affect other implementations of the WDK (ie Oracle). If there is a place where ResultFactory must be changed to handle a specific implementation, then we should factor that part of the code into the database implementation classes rather than changing ResultFactory (and the wdk commands) themselves. Therefore, we discourage changing ResultFactory class, and cannot provide support for any changes you might make, particularly as new releases of the WDK become available. Instead, we would rather that groups who need to make these changes write to the wdkdev list with their requirements and we will be able to change the code together. We will begin this process next week with the current issues with Postgres. Sorry for the inconvenience. We understand that we are a little biased towards Oracle here at CBIL and again appreciate collaborative efforts. Dave On Fri, 28 Jan 2005, Dave Barkan wrote: > Hey Alberto, > > Here is what I have so far. Sorry I don't have the complete solution but I > don't have any sort of setup yet on a Postgres instance, I will see what I > can do about getting that set up on our side for better debugging. > > First of all, your assertion here: > >> In the "PostgreSQL.java" file we edited: >> >> line 117: >> String alterSql = "alter table " + tableName + " add i varchar(100)"; >> >> We changed "number(12)" to "varchar(100)" because in the next line it makes >> an update and try to insert characters in that field that was "number(12)" >> then it was only accepting numbers. > > > > The next line you mention (line 123) is > > String rownumSql = "update " + tableName + " set i = " + tableName + > "_sq.nextval"; > > Now that should evaluate to "update query_result_2 set i = > query_result_2_sq.nextval" > > and query_result_2_sq.nextval is the proper way to call the next value in the > primary key sequence for that table, right? So that should evaluate to a > number, not a string. I am not sure why it is evaluating to > "query_result_2_sq" as it seems to be in your code...where did the ".nextval" > go?? > > Can you make sure that line 123 is what I think it should be above? Sorry to > be obtuse about this, but just make sure you are using WDK version 1.1 or > later for this, I remember we made some PostGres upgrades at some point and > they were all incorporated into 1.1. (as a side note, we have 1.2 out if you > want to work with that instead). > > Regardless, that column should remain a number, not the string it is above. > > Let us handle the ResultFactory issue after we solve this one because they > might be related. I will continute to investigate. > > Dave >> >> In "ResultFactory.java", lines 312 until 346: >> >> In the following error, it assumes the "nextID" variable as being >> "gus.QueryInstance_pkseq" and returns the error because this field should >> receive a numeric value: we changed the variable to a numeric value (in the >> script) to test and the data were inserted with success. >> >> [poliana@phytomonas gus_home]$ wdkQuery -model toyModel -query >> RnaIds.ByDbESTLib -params NumEstLibs 6 AssemblyConsistency 80 >> Failed executing sql: >> insert into gus.QueryInstance (query_instance_id, query_name, cached, >> session_id, dataset_name, start_time, param0, param1) values >> (gus.QueryInstance_pkseq, 'RnaIds.ByDbESTLib', 1, null, null, now(), >> '6', '80') >> >> org.gusdb.wdk.model.WdkModelException: >> org.postgresql.util.PSQLException: ERROR: relation "gus" does not >> exist > > >> >> >> ----------------------------------------------------------------------------------------------------------- >> After debugging that, we got this: >> >> [poliana@phytomonas gus_home]$ wdkQuery -model toyModel -query >> RnaIds.ByDbESTLib -params NumEstLibs 6 AssemblyConsistency 80 >> 92484435 query_result_2_sq >> 92484471 query_result_2_sq >> 92484523 query_result_2_sq >> 92484578 query_result_2_sq >> 92484601 query_result_2_sq >> 92484678 query_result_2_sq >> 92484682 query_result_2_sq >> 92484686 query_result_2_sq >> 92484695 query_result_2_sq >> 92484703 query_result_2_sq >> 92484708 query_result_2_sq >> 92484710 query_result_2_sq >> 92484731 query_result_2_sq >> 92484741 query_result_2_sq >> 92484752 query_result_2_sq >> 92484755 query_result_2_sq >> 92484758 query_result_2_sq >> 92484764 query_result_2_sq >> 92484767 query_result_2_sq >> 92484768 query_result_2_sq >> 92484772 query_result_2_sq >> 92484779 query_result_2_sq >> 92484780 query_result_2_sq >> 92484801 query_result_2_sq >> 92484835 query_result_2_sq >> 92484836 query_result_2_sq >> 101853404 query_result_2_sq >> >> So... is the latter the expected output for "wdkQuery" ? If so, then looks >> like we have lot of debugging to do, if not maybe we are just not >> invoking/using the commands properly... as usual, any further suggestions >> are greatly appreciated ;-) >> >> Alberto >> >> > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Gusdev-gusdev mailing list > Gus...@li... > https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > |