Some interesting ideas. I don't see XML on the PG radar screen, I'm afraid. If it weren't for us (OpenACS), I'm not sure the web would really be on their radar screen. At times I wonder if they HAVE a radar screen! Let's just say that the developer's group has grown from a fairly eclectic user community which seems to somewhat detatched from the real world. Great Bridge should help repair this disconnect, forming a bridge to the real world. The more I think about that corporate name the more I like it, hmmm!
aD has played with at least two open source XML parsers written in Tcl. The use of XML you propose isn't dependent on the parser being embedded in the database engine, and in fact portability might be enhanced if it isn't. On the other hand, since Postgres supports embedded Tcl procs burying a parser might be easy. There are parsers available in Java, too, but you can't embed Java into Postgres. One OpenACS guy is working on a "mod_java" for AOLserver, though, so making use of a Java XML parser might be possible before too long.
As far as using XML as a tool to provide an abstraction layer between the database and code dependent on query results, it's one way to go about it. We've tossed around other ideas, as well. One thing for certain is that we'll be abstracting the SQL rather than maintain a separate port for InterBase. Exactly how we'll attack this problem is up in the air, still.
For the most part, the OpenACS team is content with Tcl as the underlying language. Or more accurately, content with whatever arsDigita is doing as long as we can easily map it from Oracle to Postgres or Interbase. At this point, we still see ourselves as leveraging aD's efforts rather than breaking off on our own, though at times forking seems like an inevitability. We'd prefer not to, though, and if aD decides they are willing to work on abstracting out SQL rather than scattering Oracle-isms hither and thither throughout the code, we'll probably adopt whatever choice they make. They pay real money to real staffers to work on the toolkit, so we should take advantage of this fact as much as possible.
Another inevitability - a joyful one! - is that this project will continue to attract thoughtful and intellegent people. The time may come when we feel like we have sufficient resource to do whatever we want, paying little or no attention to aD. If so, it's some time down the road (and personally, I hope OpenACS and aD's ACS Classic stay coupled).
Welcome aboard!