New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some missing common functions #37

Closed
sgrif opened this Issue Dec 1, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@sgrif
Member

sgrif commented Dec 1, 2015

We have max. We don't have min. Or avg, sum, etc. We should add these. They should not use the sql_function! macro, as they need to accept more than one argument type. min should have the same bounds as max. Others might need new bounds. I'm fine with just naming the trait something like CanBePassedToAvg or something, if there's not a good generic name. If you ever need to find the types which can be passed to a function in postgres, just open up psql and run this query:

select typname from pg_type where oid in (select proargtypes::text::oid from pg_proc where proname = 'sum');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment