A simple memory game implemented with plpgsql