Arrays of composite types
Jacob Joseph <[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all. I have a few questions about the use of psycopg for dealing with arrays of such composite types. I have a few composite types in postgres, each of a few floats and integers. I've then constructed an array of such types. I'd like to be able to get back a list of tuples. Currently, registering the composite type doesn't end up running my adapter, presumably because the composite array actually has a different OID. I can register the array OID as well, but then I'm left splitting and parsing the entire string in python. Is there a way to use the existing array parsing code in psycopg2, and use the newly registered adapter on each element? As for parsing composite types, is there any loss of precision converting the string representation of a (e.g.,) float from the database to a python float? Is the original bit representation of the float available for use? For a final bit of wishful thinking, are there plans to automatically derive adapters for composite types. Are there fundamental obstacles to this? Thanks. ~Jacob _______________________________________________ Psycopg mailing list Psycopg-IAPFreCvJWPBWskQ1e/[email protected] http://lists.initd.org/mailman/listinfo/psycopg
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFKHaZLMpwSl5zyBnARAodEAJ9Laio+CCERxCZTrV0kdkM5m5q6pgCfeQNQ JZzrFlG/t7jNNFir9ueR/2Q= =INHR -----END PGP SIGNATURE-----