In SQLite it is possible to make virtual tables based on things outside the database, as described in this article:
http://www.drdobbs.com/database/query-anything-with-sqlite/202802959
That's great, but I like the PostgreSQL command line client better than the one for SQLite. So, how can I make virtual tables in PostgreSQL?
You want "foreign data wrappers" (often abbreviated "fdw"). There are a couple included in the core postgresql distribution: file_fdw, which allows you to create a table interface to files local to the DB, and postgres_fdw, which allows you to interface with other postgresql databases.
There are a number of community-written fdws, as well, for interacting with things like couchdb, mysql, or even amazon s3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With