Page 1 of 1

array_agg issue

PostPosted: Thu Aug 14, 2025 8:37 am
by 4StarGen
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

Re: array_agg issue

PostPosted: Fri Aug 15, 2025 7:09 am
by Flag_Hippo
I don't believe a column can hold an array and that is likely why this is being rejected and not saved.

Re: array_agg issue

PostPosted: Sat Aug 16, 2025 5:02 am
by 4StarGen
But this method has been used before

https://www.pokertracker.com/forums/vie ... gg#p330670

Re: array_agg issue

PostPosted: Sat Aug 16, 2025 7:26 am
by Ventilatorrr
I do not know enough about this to be able to help, but someone will get back to you next week.

Re: array_agg issue

PostPosted: Sat Aug 16, 2025 4:04 pm
by 4StarGen
Ty Ventilatorrr :)

Re: array_agg issue

PostPosted: Mon Aug 18, 2025 4:45 am
by WhiteRider
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.

Re: array_agg issue

PostPosted: Mon Aug 18, 2025 6:49 am
by 4StarGen
Ty mate, gonna try that