Skip to content

Conversation

causal-agent
Copy link
Contributor

Fixes #189.

return Err(Error::Conversion("array contains too many dimensions".into()));
}
match try!(raw.read_i32::<BigEndian>()) {
0 => return Ok(Vec::new()),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does a 0 dimensional array skip the rest of the metadata fields (has_nulls, member_oid, etc)? Does anything break if we just continue on when the number of dimensions is 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I let it keep reading, it hits EOF trying to read _index_offset. Seemed easier to just return an empty Vec early.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok cool, I guess the database doesn't transmit the rest of the stuff.

@sfackler sfackler merged commit 5a58966 into sfackler:master Jul 7, 2016
@sfackler
Copy link
Owner

sfackler commented Jul 7, 2016

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants