bruce wrote: > I talked to the Orafce author. He says Orace is focused on adding > missing Oracle functionality to Postgres, rather than helping in > porting. > > For example, decode() was only added in Orafce 3.0beta because Postgres > already has the CASE statement. Also, NVL is COALESCE: > > > http://forums.devshed.com/postgresql-help-21/does-postgresql-7-4-supports-nvl-decode-function-which-are-178892.html > > For this reason, I suggest we rewrite decode() and NVL to be > ANSI-standard Postgres and Oracle supported syntax, rather than using > Orafce for these cases. > > FYI, Orafce 2.1.4 works on Postgres 8.1, while 3.0.0.beta3 does not > compile. I can probably get that fixed if we want 3.0.0 for some > reason, but we might be better going with the more stable 2.1.X release.
Sorry, maybe I wasn't clear. On this page: https://fedorahosted.org/spacewalk/wiki/PostgresTechnicalApproach we list the four query types: 1. work unchanged in both Oracle and Postgres 2. can be rewritten to work on both databases, e.g. ANSI joins, CURRENT_TIMESTAMP, CASE instead of decode(), COALESCE instead of NVL() 3. (same) but requires db changes, e.g. add compatibility functions from Orafce 4. need to create a Postgres-specific version of the query Previously I mentioned decode() in #3, but I have now updated the wiki to mention the use of CASE intead of decode, etc. I think we should be doing #3 only if we can't easily rewrite the query to be a #2. -- Bruce Momjian <br...@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + _______________________________________________ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel