teoljungberg / fx

Versioned database functions and triggers for Rails
MIT License
763 stars 77 forks source link

Does not include aggregates when dumping schema (#34) #50

Closed johydoski closed 4 years ago

johydoski commented 5 years ago

Calling pg_get_functiondef(some_oid) on aggregates fails. Assuming this gem is not meant to support aggregate functions, aggregate functions are now excluded via omitting them from the query that pulls function definitions from PG. This is achieved by checking for the function's presence in table pg_aggregate.

pg_aggregate is present in all officially supported PG versions ( >= 9.4 ).

vladimirtemnikov commented 5 years ago

@teoljungberg This looks prettier than https://github.com/teoljungberg/fx/pull/38 The difference is in joining with another table, but it does the same thing. I think it's will be better to apply these changes instead of #38

bradrobertson commented 4 years ago

I can confirm this works for us on PG 11 and PG 10

bradrobertson commented 4 years ago

Can we get some movement on this? The implementation seems pretty straightforward and tested. This would be a blocker for anyone needing postgis with fx