Good answer. I guess we work in slightly different realms :)
I've set up tasks to run at build-time in Xcode - the 'Build Phases' tab can add tasks to be run automatically, which are just shell-scripts and Xcode sets up just about every variable under the sun for you in the environment, so you can navigate to the right directory, add the current-target as part of a name etc. They're saved as part of the project so everyone gets them.
But that doesn't cope with the interactive side of what you're talking about. In truth, I've always just done that from the command line 'pqsl -d <database>' (or 'sqlite3 database') has always been sufficient - though if your interactive session shares the database context that the application is also using (so you're not waiting for a flush to get updates) that would be interesting.
Quality checking I tend to integrate with git rather than the IDE, setting up a hook on pre-commit to run unit tests and so on. In a previous life different teams used different IDEs, but we always wanted the tests to run :)