array_agg issue

Discuss how to create custom stats, reports and HUD profiles and share your creations.

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

array_agg issue

Postby 4StarGen » Thu Aug 14, 2025 8:37 am

When I try to use array_agg I get a strange error

Code: Select all
ARRAY_AGG(
CASE
        WHEN cash_hand_player_statistics.flg_p_first_raise
        THEN (cash_hand_player_statistics.amt_p_raise_made / cash_limit.amt_bb)::double precision
        ELSE NULL
    END)


The expression is correct, PT4 validates it, when I click to save it saves it but after a second it tells me I need to enter an expression and the column just vanish
4StarGen
 
Posts: 1019
Joined: Sat Mar 08, 2014 6:58 am

Re: array_agg issue

Postby Flag_Hippo » Fri Aug 15, 2025 7:09 am

I don't believe a column can hold an array and that is likely why this is being rejected and not saved.
Flag_Hippo
Moderator
 
Posts: 17044
Joined: Tue Jan 31, 2012 7:50 am

Re: array_agg issue

Postby 4StarGen » Sat Aug 16, 2025 5:02 am

But this method has been used before

https://www.pokertracker.com/forums/vie ... gg#p330670
4StarGen
 
Posts: 1019
Joined: Sat Mar 08, 2014 6:58 am

Re: array_agg issue

Postby Ventilatorrr » Sat Aug 16, 2025 7:26 am

I do not know enough about this to be able to help, but someone will get back to you next week.
Ventilatorrr
Moderator
 
Posts: 116
Joined: Sun Jul 19, 2015 12:39 pm

Re: array_agg issue

Postby 4StarGen » Sat Aug 16, 2025 4:04 pm

Ty Ventilatorrr :)
4StarGen
 
Posts: 1019
Joined: Sat Mar 08, 2014 6:58 am

Re: array_agg issue

Postby WhiteRider » Mon Aug 18, 2025 4:45 am

The example in the thread you linked turns the array into a string using "array_to_string", so you may want to try that here too.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: array_agg issue

Postby 4StarGen » Mon Aug 18, 2025 6:49 am

Ty mate, gonna try that
4StarGen
 
Posts: 1019
Joined: Sat Mar 08, 2014 6:58 am


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 1 guest