---
title: "Foreign Data Wrapper: Postgresify all the things!"
url: https://daily.dev/posts/foreign-data-wrapper-postgresify-all-the-things--igjvljpdq
source_url: https://marmelab.com/blog/2026/06/03/foreign-data-wrapper-postgresify-everything.html
type: article
source: "marmelab"
published: 2026-06-03T15:23:15.495Z
updated: 2026-06-03T15:23:41.929Z
tags: ["postgresql", "mongodb", "rest-api"]
reading_time: 5
upvotes: 2
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Foreign Data Wrapper: Postgresify all the things!

**[marmelab](https://daily.dev/sources/Marmelab)** · 5 min read · 2 upvotes · 0 comments

## Summary

PostgreSQL's Foreign Data Wrapper (FDW) feature allows querying external data sources directly via SQL, treating them as virtual tables. The post covers four use cases: querying CSV files with the built-in file_fdw extension, connecting to another PostgreSQL database with postgres_fdw, accessing NoSQL databases like MongoDB using existing FDW extensions or custom ones built with Multicorn (a Python library), and wrapping REST APIs as queryable foreign tables. Multicorn enables building custom FDW extensions for virtually any data source, including authenticated APIs. The approach eliminates the need for custom ETL scripts or cron jobs to sync external data.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://marmelab.com/blog/2026/06/03/foreign-data-wrapper-postgresify-everything.html>

## Similar posts on daily.dev

- [How to Elevate Your Database Game: Supercharging Query Performance with Postgres FDW](https://daily.dev/posts/how-to-elevate-your-database-game-supercharging-query-performance-with-postgres-fdw-rcgzbqous) · freeCodeCamp · 1 upvotes · 0 comments

---

Tags: [#postgresql](https://daily.dev/tags/postgresql), [#mongodb](https://daily.dev/tags/mongodb), [#rest-api](https://daily.dev/tags/rest-api)

[View this post on daily.dev](https://daily.dev/posts/foreign-data-wrapper-postgresify-all-the-things--igjvljpdq)
