{"action":"created","issue":{"url":"https://api.github.com/repos/impossibl/pgjdbc-ng/issues/231","labels_url":"https://api.github.com/repos/impossibl/pgjdbc-ng/issues/231/labels{/name}","comments_url":"https://api.github.com/repos/impossibl/pgjdbc-ng/issues/231/comments","events_url":"https://api.github.com/repos/impossibl/pgjdbc-ng/issues/231/events","html_url":"https://github.com/impossibl/pgjdbc-ng/issues/231","id":130123688,"number":231,"title":"NullPointerException when decoder an array in array","user":{"login":"gitSquirel","id":15279807,"avatar_url":"https://avatars.githubusercontent.com/u/15279807?v=3","gravatar_id":"","url":"https://api.github.com/users/gitSquirel","html_url":"https://github.com/gitSquirel","followers_url":"https://api.github.com/users/gitSquirel/followers","following_url":"https://api.github.com/users/gitSquirel/following{/other_user}","gists_url":"https://api.github.com/users/gitSquirel/gists{/gist_id}","starred_url":"https://api.github.com/users/gitSquirel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gitSquirel/subscriptions","organizations_url":"https://api.github.com/users/gitSquirel/orgs","repos_url":"https://api.github.com/users/gitSquirel/repos","events_url":"https://api.github.com/users/gitSquirel/events{/privacy}","received_events_url":"https://api.github.com/users/gitSquirel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-31T12:52:54Z","updated_at":"2016-02-01T15:56:59Z","closed_at":null,"body":"pgjdbc-ng: 0.6, postgresql: 9.5\r\n\r\nI have a query like this:\r\nselect  a.x, array(select row(b.*)::b from b\r\n              where b.pid = a.id) bs from a\r\n              where a.id = {id};\r\nwhich a is a table, b is a view like this:\r\nSELECT x.a,  x.b,\r\n    ARRAY( SELECT ROW(y.a, y.config)::y FROM y WHERE y.a = x.a ) AS ys\r\n   FROM x;\r\n\r\nI have another query that has an array select in array, but it works.\r\n\r\nHere is the exception:\r\nCaused by: java.lang.NullPointerException: null\r\n        at com.impossibl.postgres.system.procs.Records$BinDecoder.decode(Records.java:90) ~[pgjdbc-ng-0.6.jar:na]\r\n        at com.impossibl.postgres.system.procs.BinaryDecoder.decode(BinaryDecoder.java:44) ~[pgjdbc-ng-0.6.jar:na]\r\n        at com.impossibl.postgres.system.procs.Arrays$BinDecoder.readElements(Arrays.java:160) ~[pgjdbc-ng-0.6.jar:na]\r\n        at com.impossibl.postgres.system.procs.Arrays$BinDecoder.readArray(Arrays.java:129) ~[pgjdbc-ng-0.6.jar:na]\r\n        at com.impossibl.postgres.system.procs.Arrays$BinDecoder.decode(Arrays.java:111) ~[pgjdbc-ng-0.6.jar:na]\r\n        at com.impossibl.postgres.system.procs.BinaryDecoder.decode(BinaryDecoder.java:44) ~[pgjdbc-ng-0.6.jar:na]\r\n        at com.impossibl.postgres.system.procs.Records$BinDecoder.decode(Records.java:95) ~[pgjdbc-ng-0.6.jar:na]\r\n        at com.impossibl.postgres.system.procs.BinaryDecoder.decode(BinaryDecoder.java:44) ~[pgjdbc-ng-0.6.jar:na]\r\n        at com.impossibl.postgres.system.procs.Arrays$BinDecoder.readElements(Arrays.java:160) ~[pgjdbc-ng-0.6.jar:na]\r\n        at com.impossibl.postgres.system.procs.Arrays$BinDecoder.readArray(Arrays.java:129) ~[pgjdbc-ng-0.6.jar:na]\r\n        at com.impossibl.postgres.system.procs.Arrays$BinDecoder.decode(Arrays.java:111) ~[pgjdbc-ng-0.6.jar:na]\r\n        at com.impossibl.postgres.system.procs.BinaryDecoder.decode(BinaryDecoder.java:44) ~[pgjdbc-ng-0.6.jar:na]\r\n        at com.impossibl.postgres.protocol.v30.BindExecCommandImpl$BindExecCommandListener.rowData(BindExecCommandImpl.java:113) ~[pgjdbc-ng-0.6.jar:na]\r\n        at com.impossibl.postgres.protocol.v30.ProtocolImpl.receiveRowData(ProtocolImpl.java:1000) ~[pgjdbc-ng-0.6.jar:na]\r\n        at com.impossibl.postgres.protocol.v30.ProtocolImpl.dispatch(ProtocolImpl.java:790) ~[pgjdbc-ng-0.6.jar:na]\r\n        at com.impossibl.postgres.protocol.v30.MessageHandler.channelRead(MessageHandler.java:46) ~[pgjdbc-ng-0.6.jar:na]\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/impossibl/pgjdbc-ng/issues/comments/178041236","html_url":"https://github.com/impossibl/pgjdbc-ng/issues/231#issuecomment-178041236","issue_url":"https://api.github.com/repos/impossibl/pgjdbc-ng/issues/231","id":178041236,"user":{"login":"kdubb","id":787655,"avatar_url":"https://avatars.githubusercontent.com/u/787655?v=3","gravatar_id":"","url":"https://api.github.com/users/kdubb","html_url":"https://github.com/kdubb","followers_url":"https://api.github.com/users/kdubb/followers","following_url":"https://api.github.com/users/kdubb/following{/other_user}","gists_url":"https://api.github.com/users/kdubb/gists{/gist_id}","starred_url":"https://api.github.com/users/kdubb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdubb/subscriptions","organizations_url":"https://api.github.com/users/kdubb/orgs","repos_url":"https://api.github.com/users/kdubb/repos","events_url":"https://api.github.com/users/kdubb/events{/privacy}","received_events_url":"https://api.github.com/users/kdubb/received_events","type":"User","site_admin":false},"created_at":"2016-02-01T15:56:59Z","updated_at":"2016-02-01T15:56:59Z","body":"Can you provide a piece of JDBC test code that exhibits the error?  Apologies if it seems trivial to do ourselves but code that can be copied & pasted goes a long way to reducing our time to fix.\r\n\r\nBonus points for a adding a unit test that fails :+1: "}}