Foreign data wrappers are a standardized way of handling access to remote objects from SQL databases. Using the foreign data wrapper module, you can connect PostgreSQL to different types of data sources.
All the foreign data wrapper modules for PostgreSQL are available at https://wiki.postgresql.org/wiki/Foreign_data_wrappers.
Some of these also allow the calculation of aggregates directly on the remote server, bringing only already calculated data to PostgreSQL; this feature is called foreign data wrapper aggregate pushdown.