efcore.pg icon indicating copy to clipboard operation
efcore.pg copied to clipboard

Support PostgreSQL-specific aggregate functions

Open schmitch opened this issue 7 years ago • 5 comments

Hello, I'm not sure if it is possible, but it would be great if Npgsql would support more Aggregate Functions, especially when using Group By queries.

Currently only a few of the list at: https://www.postgresql.org/docs/current/functions-aggregate.html are support. However it would be good if others like bool_and or bool_or will be supported.

I'm not sure if it is even possible since I didn't see custom pgsql only aggregate functions (yet), also it might be troublesome to work with IGrouping<anon type, anon type>.

Work:

  • [x] #2393
  • [x] #2395
  • [x] #532
  • [x] #2384
  • [x] #2339
  • [x] #2481
  • [ ] #2394

schmitch avatar Nov 29 '18 10:11 schmitch

We haven't yet looked into supporting PostgreSQL-specific aggregate functions - hopefully the EF Core infrastructure makes that possible. Let's examine this for 3.0.

roji avatar Nov 29 '18 17:11 roji

Definitely interested in these along with #532. I believe it's currently feasible, but was nontrivial when I scoped it a few months ago.

austindrenski avatar Nov 29 '18 18:11 austindrenski

ST_AsMVT is a PostGIS aggregate function requested here: https://github.com/npgsql/efcore.pg/issues/457#issuecomment-834934428

roji avatar May 08 '21 10:05 roji

Issue tracking the necessary EF Core infrastructure changes: https://github.com/dotnet/efcore/issues/22957

roji avatar May 08 '21 10:05 roji

Infrastructure for custom aggregates implemented in #2393; this is the counterpart to https://github.com/dotnet/efcore/pull/28092 on the EF Core side.

roji avatar Jun 04 '22 16:06 roji