PostgreSQL 9.1 will ship with an FDW that allows access to files in formats that can be read by the existing COPY command, and Andrew Dunstan has been working on an FDW that will allow access to files with fixed-width data as well as one for accessing ragged CSV files.
I've been a big proponent of SQL/MED support, particularly at work, so was pleased to finally find some time to look at the work that's been done for 9.1 earlier in the week. I don't have much interest in reading external files (though clearly that is an important feature for some users) - I'm far more keen to see PostgreSQL have the ability to access the data in all those other databases you may not be able to migrate away from, or are better suited to particular workloads. So, with that in mind, I picked a NoSQL database more or less at random (though intentionally one that's a simple key/value store) and started hacking on an FDW for Redis.
The code is still pre-alpha quality, and there are a number of TODOs, including:
- Add qual pushdown
- Handle different Redis datatypes correctly
- Figure out how to make Redis scans atomic (or at the least properly handle tuples that have been removed since the initial scan)
- Handle Redis authentication
As always with Open Source, feel free to play with this if you think you might find it useful, but don't blame me if it breaks (which it likely will)!
Post a Comment