On Thu, May 07, 2015 at 10:04:47PM +0200, Adam Sjøgren wrote: > I just thought that when DBD::Pg handles "simple" arrays, handling > arrays of tuples wouldn't be much further a step.
The problem isn't so much as *how* to do it as *when*. It cannot be done when we are reading in a resultset and come across an unknown type. It cannot be done at startup as the overhead of scanning the system tables for custom types would be too heavy. So it would need to be an invoked method. Then it would somehow need to be tied into the current type system. Right now, DBD::Pg uses the Postgres source code to generate a static list of core data types, and knows which ones represent arrays. There is no easy way to shoehorn new entries in there after the fact, so it's not a trivial undertaking. It may be easier/more feasible to set an attribute and tell DBD::Pg directly that column X needs to be handled as an array, but that gets messy in other ways. If anyone wants to discuss the design further (and I do want to get this functionality written sometime soon), let's talk on the dbd-pg list only. -- Greg Sabino Mullane g...@endpoint.com End Point Corporation PGP Key: 0x14964AC8
signature.asc
Description: Digital signature