What are the pros and cons of performing calculations in sql vs. in your application What are the pros and cons of performing calculations in sql vs. in your application postgresql postgresql