Page 1 of 1

Bulk linking players via sql

PostPosted: Tue Aug 11, 2026 7:23 pm
by buzzbuzz
I have a list of players each with multiple screen names across different sites, that I want to link together for combined HUD/report stats. I've confirmed the standard aliasing process (View Stats > alias icon > add screen names) works perfectly for combining stats.

Doing this one at a time through the UI for 50+ people is going to take a while, so I tried replicating it directly via SQL (pgAdmin) instead -- specifically, updating the id_player_alias column on the player table to point secondary accounts at a main account's id_player, matching the pattern I see on my own already-aliased accounts. I then ran Database > Housekeeping > Rebuild Cache.

This did NOT work -- Reports and HUD stats only showed hands/ stats for the "main account", even though the Player list showed them as "aliased." When I instead linked the same two accounts through the normal UI process, it worked immediately and correctly.

So there's clearly something the UI does beyond setting id_player_alias that I'm missing. I noticed tourney_hand_player_statistics has both an id_player and an id_player_real column -- is the UI backfilling id_player_real on existing hand rows when you add an alias? Is there a specific stored procedure or internal process I could call directly to replicate this for many players at once, rather than doing it manually one at a time?

Backed up my database before any of this, all confirmed-working parts were done through the standard aliasing UI. Just trying to find a faster path for linking a large batch of players. Appreciate any insight!

Re: Bulk linking players via sql

PostPosted: Wed Aug 12, 2026 5:03 am
by Flag_Hippo
For more information you can enable logging (Configure -> Options), restart PokerTracker 4, set an alias and check the log file to see what happens:

C:\Users\{Windows Login}\AppData\Local\PokerTracker 4\Logs\PokerTracker4.log

Beyond that please note we do not support modifying the database outside of PokerTracker 4.