Re: Interface for composite types

"David E. Wheeler" <[email protected]>
Newsgroups gmane.comp.db.postgresql.dbdpg
Message-ID <[email protected]>
On Jun 7, 2008, at 16:12, Greg Sabino Mullane wrote:

> It does add some overhead, so I'm not comfortable having it  
> automatically
> enabled quite yet. This method basically slurps all the custom type
> information from the system catalogs and stores in internally in a
> C/XS LL struct. When we are fetching and find an unknown type, we walk
> the list of custom types to find a match. If we do find one, we make
> a temporary sql_info_type struct for it and move on. Then we call a
> second internal function for each row, pg_build_hashref(), which  
> recursively
> converts the string returned by Postgres into a glorious nest of  
> hashrefs and
> arrayrefs. Most of all that is written. What's also needed is the  
> reverse
> mapper, to change a bunch of hashrefs into a stringified form to  
> pass to
> PQexec and friends, and some minor bind_param hacks.

Nice. Would this work for hstore types, then?

Best,

David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.