marijnh/Postmodern — pull request #25 by segv (2012-11-11 13:11:10+00:00)
Title: added function parse-connection-string for parsing libpq style (or whatever they're called) connection strings.

convert strings like "postgresql://other@localhost/otherdb?port=10&application_name=myapp" or "host=localhost port=5432 dbname=mydb connect_timeout=10" to arguments to cl-postgres:open-database.

this function is not strictly a new feature, but if it has to live somewhere it fits better in cl-postgres than in my little db-utils.lisp file.

my patch adds dependencies on cl-ppcre and do-urlencode (the code would be cleaner with additional dependencies on alexandria and iterate, but i tried to limit the new deps to what was really needed (the dependncy on do-urlencode could pretty easily be dropped as well but doing the url decode inline)). it'd be possible to also remove the dependency on cl-ppcre, but i'm guessing everyone already has that lib anyway (and if they don't, they probably wil soon enough)