Re: A list of open points in the documentation

Federico Di Gregorio <fog-NGVKUo/i/[email protected]> Sun, 21 Feb 2010 01:44:38 +0100
Newsgroups gmane.comp.python.db.psycopg.devel
Message-ID <[email protected]>
On 13/02/2010 12:36, Karsten Hilbert wrote:
> re ENUMs:
> 
> Perhaps the default could to map them to a FrozenSet somehow.
> 
> Upon importing extensions it might be be useful to be able
> to activate OrderedSet support for them.
> 
> OTOH, the actual column value is probably nothing but a
> string going back and forth between PostgreSQL and Python.
> Isn't the ENUM more like a glorified DOMAIN inside the
> database ?  So, perhaps there isn't really much to worry
> about and I am making much ado about nothing ?
> 
> It strikes me as useful to support something like
> 
>    psycopg2.extensions.get_domain_range(table.enum_typed_column)
> 
> which would return an OrderedSet :-)
> 
> This would come in handy in making applications more data driven.

I mostly agree, but I'll think about enums after next release (and
probably also after the much needed TZ rewrite).

federico

-- 
Federico Di Gregorio                                       fog-NGVKUo/i/[email protected]
   I filosofi son come i sociologi: il mondo non lo capiscono. -- A.R.M.

_______________________________________________
Psycopg mailing list
Psycopg-IAPFreCvJWPBWskQ1e/[email protected]
http://lists.initd.org/mailman/listinfo/psycopg
signature.asc (application/pgp-signature, 262 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuAgfYACgkQvcCgrgZGjetAkwCgxRw8aGWS5UFocpx5M1y+qYWk
RJYAoIHQthzjnjMZI18pIBXDc4JkcK6+
=+8bB
-----END PGP SIGNATURE-----