couch-to-postgres
couch-to-postgres copied to clipboard
attachments - issue to hold info on them
I dont think works with _attachments - or is ignoring them - as they are in couch and I think postgres is more use manipulating/generating reports/ad hoc queries on the data rather than dealing with attahments.
Not done any tests with them yet
https://github.com/pramsey/pgsql-http/issues/3
See above on how to deal with binary with postgres http extension
Not something im planning on working on for a while so if you need to grab the attachments from couch and add to postgres or submit attachments to couch please dive in.
I think for getting them into postgres the node daemon may not be the best way and rather have some cron task to check through the docs and then issue http_get/http_post requests from postgres and grab them like that.
I did have a quick look at LISTEN and NOTIFY in node and it works well so node could send postgres a message when it sees an attachment change - it should be possible to encode all info for the http request function in the message payload too 8000 bytes should be enough for a full url to the attachment plus _id, _rev and dbname and leave space for more