My dream would be a database where Haskell is the query language. It's more expressive than SQL and more composable. Every time I see a new SQL feature that would be trivial in a modern language it feels like we're working harder instead of smarter.
The developer notes:<p><i>As such, unprivileged users are permitted to write and execute functions without the possibility that they will be able to access information or resources that are not allowed to access. This is accomplished by enforcing Haskell's strong type system.</i><p>Further on, it says:<p><i>Trusted functions must return type PGm (Maybe result) where result is the appropriate Haskell type as determined by the return type of function while untrusted functions must return type IO (Maybe result). The PGm monad type can be imported from the PGutils module.</i><p>This makes some sense intuitively, but it would be good to see the details worked out. There is always `unsafePerformIO`, after all...