News for hackers. Stuff that matters.
Re:Show HN: Play Battleships on PostgreSQL by searchableguy on Tuesday September 22, 2020 @06:57AM (#24553037)
Can someone explain how this works?

I followed the instructions and it asked to me to open two psql processes and call an instruction from the other which I did.

> postgres=# INFO: Let's connect keyboard. Open another psql process and enter "K1GSFJF0;"

Re:Show HN: Play Battleships on PostgreSQL by spalas on Tuesday September 22, 2020 @07:48AM (#24553379)
K1GSFJF0 is a random password generated here:

https://github.com/Firemoon777/sql-battleships/blob/87770216...

It then queries every second looking for a session in the postgres_log for a query that matches that password and stores the session id into a table named ks_id.

Once it knows the session_id it can then listen for any input associated to that session.