data type improvments

fix handling of text columns with zero size (select null from ...) and
add case for RAW fields
Merge pull request #1 from MattKunze/data-type-handling

data type improvements