On Mon, Nov 07, 2011 at 04:20:01PM -0800, Chris Travers wrote: > 1) I remember reading previously about complex type support in > DBD::Pg, but reading through the perl module code, I can't find how > hashrefs are mapped to string representations of tuples. Is this in > fact supported at present? Is there a private method I can call for > the parsing (for reasons, see below)?
There's presently no DBD::Pg support for this, public or otherwise. > 2) Reading through the DBD::Pg code, I am guessing it is not possible > to pass arrays of complex types to DBD::Pg is it? Complex types have input/output string representations, so you can use your own marshalling between hash references and those string representations. For example, given "CREATE TYPE foo AS (a int, b int)", you can compose a literal of type foo[] with something like "$dbh->quote(['(1,2)', '(3,4)'])". > 3) If I want to use table definitions as complex types, this won't > work with the current discovery, correct? Could you clarify this question? > Would the DBD::Pg team be interested in patches at some point on these > areas? The DBD::Pg TODO file mentions it. I would value it personally. Thanks, nm
