On Sep 8, 2009, at 8:45 AM, Andrew Dunstan wrote:

No doubt it's possible to have DBD::Pg learn about user-defined composites and arrays of them, although the code for doing so might get a bit elaborate, but how would it handle a type defined in C, the representation of which it has no way of knowing about at all? I think we have to accept that the existence of type extensibility in Postgres means that there will be at least some types that DBD::Pg has to treat as opaque bits of text.

Is there not a simple way to tell via the protocol what the data type of each column is, and whether or not it is an array of that type? DBD::Pg already does the former, to decide if something should be decoded to utf8, but the list of types is supports is hard-coded in the driver.

That's not to say that it shouldn't learn about some types in contrib like citext and hstore.

Agreed, at the very least.

Best,

David

Reply via email to