Forum OpenACS Development: Re: I could not able to execute nvl function from PostgreSql

Yes, you can, but since query files make it easy to write a custom query to use nvl() rather than coalesce() for Oracle, that's the preferred approach.

Also Oracle 9i supports coalesce().  So the preferred approach is to use coalesce() in a query in the generic query file for the script (assuming the query doesn't contain other PG/Oracle specific constructs), and the Oracle-only nvl() in an Oracle-specific queryfile.

Then later, when we drop support of 8i (which won't happen for a year or more, I'm sure!), one could remove the Oracle-specific version and both DBs would use the same query.

Oracle 9i supports much more of the SQL 99 standard and eventually, over time, we'll be able to share a lot more queries between PG and Oracle because of it.  That's a nice future to contemplate!