ankane/dexter

What is a 'database URL'?

loveencounterflow opened this issue · 3 comments

To me, it is not clear what is meant by "a database URL". Just one example would totally suffice to get started; without one, I stumped.

Update I got started with

tail -F -n +1 /var/log/postgresql/postgresql-9.5-main.log | sudo dexter "postgres://user:password@localhost:5432/dbname"

The sudo part is there to enable create extension; coming to think of it, it might be better to use

tail -F -n +1 /var/log/postgresql/postgresql-9.5-main.log | sudo -u postgres dexter "postgres://localhost:5432/mojikura" 

The second variant uses the fact that the postgres user is probably available to the current user (on Debian / Ubuntu / Mint-like distros) by using their own password to obtain sudo rights. Of course, that only works for a local database.

BTW finding the log file was a challenge in itself; http://blog.endpoint.com/2014/11/dear-postgresql-where-are-my-logs.html helped me to find it. I still don't know whether that log has the right things in it...

Hey @loveencounterflow, thanks for the feedback 👍 I updated the readme. Let me know if it's more clear.

If logging is set up correctly, Dexter will output that it's found new query fingerprints.

Processing 123 new query fingerprints

And version 0.2.0 added support for the same connection options as psql 🎉