Re: Change in datetime type casting

Поиск
Список
Период
Сортировка
От Federico Di Gregorio
Тема Re: Change in datetime type casting
Дата
Msg-id 4FEC748B.1020604@dndg.it
обсуждение исходный текст
Ответ на Re: Change in datetime type casting  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Список psycopg
On 28/06/12 16:43, Daniele Varrazzo wrote:
>
>> > Bigger question:) Is it possible to turn adaption off for a
>> > connection/cursor?
> No, I think adaptation is currently only global. No, I don't like this
> asymmetry with typecasting either.

This asymmetry exists because adaptation was modeled on PEP 246 and at
the time a global type registry was enough (you could always write your
own wrapper that would adapt the wrapped object, see AsIs for an example.)

Having per-connection and per-cursor adapter registries would be nice.

federico

--
Federico Di Gregorio                         federico.digregorio@dndg.it
Studio Associato Di Nunzio e Di Gregorio                  http://dndg.it
  Qu'est ce que la folie? Juste un sentiment de liberté si
   fort qu'on en oublie ce qui nous rattache au monde... -- J. de Loctra

В списке psycopg по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Change in datetime type casting
Следующее
От: Никитин Константин
Дата:
Сообщение: A very strange freeze