i am not aware of a definitive guideline - and actually, it is quite some work to list all potential incompatibilities between PostgreSQL and oracle (both in various versions). A potential source indicating differences is xotcl-core/tcl/05-db-procs.tcl, when you watch out for "oracle". The support there is not fully complete, but handles frequent cases of the feature-set used in OpenACS.
Further potential incompatibilities are:
- queries to stored procedures in packages (oracle uses "." as separator, pg has "__")
- tree queries (pg uses on most cases tree sortkeys, nowadays sometimes recursive queries, oracle has "connect by"
- order/limit/offset (see "xo::db::oracle instproc select")
- differences to query nextval in sequences
- differences in sql functions (e.g date functions)
- different date format
- dml differences for different datatypes and various length limitations of e.g. keys or constraint names.
While pulling incompatible sql into *postgresql.xql or *oracle.xql is great, i am not so convinced about the value of the generic .xql files. Extracting generic SQL breaks locality and makes code maintenance more complex: by looking at the Tcl code, you have no idea, what bind variables are needed by xql, when someone deletes/renames Tcl functions or variables, the xql files have to be updated as well, what people seem to forget sometimes. Often .xql files contain the same SQL repeated in many xql files, which is more obvious, when the SQL is visible in the code.
anyhow, this is not a cooking recipe, but my personal experience.