couch-to-postgres icon indicating copy to clipboard operation
couch-to-postgres copied to clipboard

attachments - issue to hold info on them

Open sysadminmike opened this issue 10 years ago • 3 comments

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

sysadminmike avatar Dec 17 '14 19:12 sysadminmike

https://github.com/pramsey/pgsql-http/issues/3

sysadminmike avatar Dec 18 '14 00:12 sysadminmike

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.

sysadminmike avatar Dec 18 '14 00:12 sysadminmike

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

sysadminmike avatar Dec 18 '14 00:12 sysadminmike