On Mon, Jan 19, 2009 at 05:19:35PM -0500, Jeff Ortel wrote: > >> I still hope that we can reach a situation when source SQL files that >> do not need to be different will not be duplicated in the repository. >> Having two trees and remembering to do every change in both sounds >> like a mantinenance nightmare to me. > > Agreed, having 2 separate trees for oracle DDL and postgres DDL will be > a real pain. Hopefully, after the EDB team creates the pg files, we can > revisit this having both sets of files for comparison. But for now, the > consensus is that the syntax is too different.
Well, it seems to me that taking (for example) CREATE TABLE source SQLs, copying them into PostgreSQL tree, fixing them to match PostgreSQL syntax / semantics expectations, and then trying to consolidate it back (which from previous communication and from reading the above is something which is being proposed to do) will make things harder in the long run (expecially the comparison and consolidation stage, which I fear will never be done) than taking CREATE TABLE source SQLs and writing enough of syntax checking / syntax munging scripts to generate PostgreSQL source SQL on the fly. We should try to generate as much of the PostgreSQL as possible. Of course, for triggers, packages, etc., separate sources are called for. But I'd really love to see directory structure of schema/common schema/oracle-specific schema/pg-specific where files in common will certainly have Oracle syntax for now because if will be populated with our current source. The PostgreSQL port should then try to generate as much of PostgreSQL SQL from common, and only if it will seen as unfeasable, move the file in question to oracle-specific to clearly mark that there is a (non-generated) PostgreSQL counterpart in pg-specific. Part of the work will certainly be kicking out trigger definitions from CREATE TABLE files and moving them to _trigger.sql files or even to separate subdirectory in the directory structure. Hmm, maybe, things like create trigger rhn_solaris_p_mod_trig before update on rhnSolarisPatch for each row begin :new.modified := sysdate; end; could even stay in the common directory because they should be pretty easy to match and identify, either with regular expression or full parser, and replace with PostgreSQL equivalent. -- Jan Pazdziora Satellite Engineering, Red Hat _______________________________________________ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel