Re: How to add explicit types so I can use OVERLAPS?
Federico Di Gregorio <fog-NGVKUo/i/[email protected]>
| Newsgroups | gmane.comp.python.db.psycopg.devel |
|---|---|
| Organization | initd.org |
| Message-ID | <[email protected]> |
Il giorno mar, 05/08/2008 alle 16.26 +0000, Matthew Wilson ha scritto: > On Fri 01 Aug 2008 05:26:03 PM EDT, Federico Di Gregorio wrote: > > I understand but here we have a problem: psycopg already worked out of > > the box. Now we have "errors" in queries that with PostgreSQL 8.2 where > > ok. psycopg is not supposed to send to the backend "unknown" values. It > > is supposed to send values of the right type. Untill now using > > PostgreSQL intrinsic ability to convert a quoted string to the right > > type worked. If it does not work anymore it should be fixed. > > > > Anyway, I'll make sure to fix this maintaining backward compatibility. I > > won't just stick in typecasts from the next release. > > I'm not familiar with the psycopg code, but I'm happy to help if I can. > If you tell me where to look and what to do, I can start. > > How will you maintain backward compatibility? Are you going to do a > test for the postgresql database version, and if it is 8.3 or greater, > you'll add the "TIMESTAMP" text? Nope, I'll just add a new flag on the connection (.explicit_typecasts) with an initial value of false. Adapters that know they need an explicit cast to work on every PostgreSQL version will just check such a flag and add the typecast when .getquoted() is called. Note that most of the adapter won't do anything different from now because they send data that can be still be casted by PostgreSQL to the appropriate type. In the future we'll switch the flag to be true by default. -- Federico Di Gregorio http://people.initd.org/fog DISCLAIMER. If I receive a message from you, you are agreeing that: 1. I am by definition, "the intended recipient". 2. All information in the email is mine to do with as I see fit and make such financial profit, political mileage, or good joke as it lends itself to. In particular, I may quote it on USENET or the WWW. 3. I may take the contents as representing the views of your company. 4. This overrides any disclaimer or statement of confidentiality that may be included on your message. _______________________________________________ Psycopg mailing list Psycopg-IAPFreCvJWPBWskQ1e/[email protected] http://lists.initd.org/mailman/listinfo/psycopg
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkiYgIEACgkQvcCgrgZGjeuvNgCeNyCEfYm8oCuCSthxN5fmubGr qBIAn3rb7UbjGNUCYHfusiW+XRFxBuNw =w25X -----END PGP SIGNATURE-----