{"action":"created","issue":{"url":"https://api.github.com/repos/brianc/node-postgres/issues/705","labels_url":"https://api.github.com/repos/brianc/node-postgres/issues/705/labels{/name}","comments_url":"https://api.github.com/repos/brianc/node-postgres/issues/705/comments","events_url":"https://api.github.com/repos/brianc/node-postgres/issues/705/events","html_url":"https://github.com/brianc/node-postgres/issues/705","id":52744268,"number":705,"title":"Plans to suport JSONB insert?","user":{"login":"tagorecaue","id":7309715,"avatar_url":"https://avatars.githubusercontent.com/u/7309715?v=3","gravatar_id":"","url":"https://api.github.com/users/tagorecaue","html_url":"https://github.com/tagorecaue","followers_url":"https://api.github.com/users/tagorecaue/followers","following_url":"https://api.github.com/users/tagorecaue/following{/other_user}","gists_url":"https://api.github.com/users/tagorecaue/gists{/gist_id}","starred_url":"https://api.github.com/users/tagorecaue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tagorecaue/subscriptions","organizations_url":"https://api.github.com/users/tagorecaue/orgs","repos_url":"https://api.github.com/users/tagorecaue/repos","events_url":"https://api.github.com/users/tagorecaue/events{/privacy}","received_events_url":"https://api.github.com/users/tagorecaue/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-12-23T14:26:09Z","updated_at":"2015-01-07T22:16:44Z","closed_at":null,"body":"Do you have plans to allow insertion in new JSONB format without have to convert JSON to String?\r\n\r\nI'm trying to read some docs from MongoDb and insert into PostgreSQL 9.4 using stream but I receive this message:\r\n\r\nPostgreSQL TypeError: Invalid non-string/buffer chunk\r\n\r\nTo solve this problem I had to convert JSON to string."},"comment":{"url":"https://api.github.com/repos/brianc/node-postgres/issues/comments/69102527","html_url":"https://github.com/brianc/node-postgres/issues/705#issuecomment-69102527","issue_url":"https://api.github.com/repos/brianc/node-postgres/issues/705","id":69102527,"user":{"login":"rpedela","id":1952582,"avatar_url":"https://avatars.githubusercontent.com/u/1952582?v=3","gravatar_id":"","url":"https://api.github.com/users/rpedela","html_url":"https://github.com/rpedela","followers_url":"https://api.github.com/users/rpedela/followers","following_url":"https://api.github.com/users/rpedela/following{/other_user}","gists_url":"https://api.github.com/users/rpedela/gists{/gist_id}","starred_url":"https://api.github.com/users/rpedela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpedela/subscriptions","organizations_url":"https://api.github.com/users/rpedela/orgs","repos_url":"https://api.github.com/users/rpedela/repos","events_url":"https://api.github.com/users/rpedela/events{/privacy}","received_events_url":"https://api.github.com/users/rpedela/received_events","type":"User","site_admin":false},"created_at":"2015-01-07T22:16:44Z","updated_at":"2015-01-07T22:16:44Z","body":"PG's wire protocol supports text and binary modes. I believe ```node-postgres``` only supports both but only text mode is well tested. For text mode, you need to convert the JSON to a string. Even in binary mode, the JSON bytes need to be converted to PG's format. Since you mentined MongoDB, I just wanted to mention that ```BSON != JSONB```."}}