pgweb icon indicating copy to clipboard operation
pgweb copied to clipboard

Add a disk-backed custom query log

Open sosedoff opened this issue 8 years ago • 2 comments

Storing SQL query log (user-generated) into a file would be a good solution for history persistence. Something like $HOME/.pgweb/history.json is fine, although will probably break when running multiple instances of pgweb on the same machine.

sosedoff avatar Feb 28 '17 04:02 sosedoff

Possible alternative: local SQLite3 db.

sosedoff avatar Feb 28 '17 04:02 sosedoff

Are you thinking of persisting every single query in this log? or would there be a custom "store query" option?

Another question - how would we uniquely identify clients? Say one client saves the query, quits and comes back up. How would we identify that the new client is the same one that stored the query?

I think we should store every single query and NOT separate queries by clients. This means that two concurrent clients may get each other's queries in their history. I think this is fine since this is how a lot of terminal emulator's history works as well (think iterm, mac's terminal etc).

akarki15 avatar Mar 21 '17 03:03 akarki15

This issue is too old and never got any traction, closing.

sosedoff avatar Feb 16 '23 03:02 sosedoff