A tictactoe implementation based on PostgreSQL plpgsql functions