sfackler / rust-postgres-array

MIT License
21 stars 10 forks source link

Empty rows #1

Closed sebmiq closed 9 years ago

sebmiq commented 9 years ago

I think the following behaviour is unintended.

let _ = conn.execute("ALTER TABLE table ADD COLUMN column int4[] DEFAULT '{}'",&[]);
let stmt = conn.prepare("SELECT column FROM table").unwrap();
for row in stmt.query(&[]).unwrap() {
     //row.result_descriptions() is &[(column, Int4Array)]
    let _:ArrayBase<Option<i32>> =row.get(0u); // panics at error retrieving column 0: end of file', src/lib.rs:1552
}
sfackler commented 9 years ago

Thanks!