3 ms·
> SQL results, coming without any translation layer, are untyped. That would depend on the database's wire protocol, wouldn't it?
by jacques_chester 8y ago
> SQL results, coming without any translation layer, are untyped.
That would depend on the database's wire protocol, wouldn't it?
- Aeolun 8y agoDo I really have to qualify this with ‘mainstream databases, with mainstream client libraries, in nearly all major languages’?
- jacques_chester 8y agoI don't know. That's why I asked. I did a quick lookup of libpq and it gave the impression that it can answer for column types.
- tathougies 8y agoMainstream databases like Postgres and SQL server (and MySQL too I think) all return type information with their results. Having written wire protocol clients for these, I flat out reject your claim that SQL isn't typed at the results level. It's one of the few places in common usage that the types are explicitly stated. Whether or not your client libraries reflect that is a different issue (and if they don't, I encourage you to use something better).