Forum OpenACS Development: Oracle 9i porting

Collapse
Posted by Mohan Pakkurti on
I am looking into porting OpenACS to Oracle 9i.

The known issues are:

1. reserved words clash
  Can we rename all the delete and rename procedures
  to delete_proc and rename_proc?

2. making sure that any default values match in the
  declaration and body of a proc.

3. deal with any other (soon to be discovered!) stricter
  checks with the new pl/sql parser.

4. How should we deal with the version numbers of the
  database in .xql files if we want to support 8 & 9?

5. What about the ad_supported_database_types list in
  acs-bootstrap-installer/tcl/20-bootstrap-procs.tcl
  I just added another entry to the list
  [list "oracle" "Oracle9" "Oracle9"]
  and changed the same in the oracle-driver, and all
  seems fine.

6. oracle-driver.
  How should we deal with the oracle-driver, and the
  version number changes in the the driver? Who maintains
  the driver?

7. Do we do this for 4.7, 4.6, any other versions?

Any comments, suggestions and things to look out for?

It would be great if we can discuss this and decide what
we like to see done in this area.

I started to do this on a check out of the cvs head and
will try to make the changes and test on both 8.1.7 and 9i.

/Mohan

Collapse
2: Re: Oracle 9i porting (response to 1)
Posted by Mohan Pakkurti on
How important is it for us to keep the function names the same as before in the PL/SQL packages when porting to 9i.

One easy and maybe a good thing to do, is to rename the functions which use reserved words for names. Example: rename delete to delete_proc etc. But this would mean extra work for existing sites to upgrade any custom code.
In the long run it is probably better to avoid using reserved words.

So, what say we rename them functions, and provide our sed or perl scripts (which I will make anyway to help in porting) to help people upgrade their custom code if they have any.

any comments?

Collapse
3: Re: Oracle 9i porting (response to 1)
Posted by Mohan Pakkurti on
Where to start first? head / 4.6.?

I am thinking of starting to port the head first, starting with the core and then the packages. The goal being 4.7 release. Does anyone believe that it is better to start elsewhere for some reason. please let me know.

/Mohan

Collapse
4: Re: Oracle 9i porting (response to 1)
Posted by Andrew Piskorski on
"delete_proc" and "rename_proc" sound really ugly. Someone can probably come up with something better. How about "rm" and "mv"? Not ideal, but better, I think.

There are some threads here somewhere about the supported Oracle versions stuff in the code, but I don't remember what the solution was, other than don't ever change it from the current "8.1.6" for now. (I think...)

I suspect renaming functions isn't a problem in Oracle as long as you include an upgrade script. (And of course, change all the occurrences in the sources.) I'm not as sure about Postgres, but that should be doable too once everyone's using a version (7.2.x?) that supports "create and replace".

If you put all the functions, procedures, and packages into their own files where they belong (not in the same foo-create.sql files as the table definitions), then the upgrade scripts become pretty simple - just re-source this or that file of PL/SQL code into the database, etc. In fact, IMNSHO that's the only sane way to do upgrade scripts for PL/SQL code living inside the database.

The Oracle driver is in the AOLserver SourceForge CVS now, and Jeff Davis has been maintaining it there of late.

Collapse
5: Re: Oracle 9i porting (response to 1)
Posted by Mark Aufflick on
Having just done a wad of Oracle 8 porting with Lars and Peter, I had to fully qualify new (and I think delete) for Oracle 8.1.7 inside the plsql function definition - as in package.funcion.new and that worked fine.

Is that the only issue for 9i or can you now not call functions with those names at all - fully qualified or not?

Collapse
6: Re: Oracle 9i porting (response to 1)
Posted by Ciaran De Buitlear on
Hi,
  We're starting a new project (will post a seperate thread about it).  As part of it wewould like to look into using 9i also.  Can we help at all?

Ciaran.