Re: Problem with memoryview
От | Frank Millman |
---|---|
Тема | Re: Problem with memoryview |
Дата | |
Msg-id | 2F8F0FA7F9BF4C2DAF92946692183ABF@frank обсуждение исходный текст |
Ответ на | Problem with memoryview ("Frank Millman" <frank@chagford.com>) |
Список | psycopg |
----- Original Message ----- From: "Daniele Varrazzo" <daniele.varrazzo@gmail.com> To: "Frank Millman" <frank@chagford.com> Cc: <psycopg@postgresql.org> Sent: Wednesday, July 31, 2013 4:56 PM Subject: Re: [psycopg] Problem with memoryview > On Wed, Jul 31, 2013 at 3:08 PM, Frank Millman <frank@chagford.com> wrote: >> >> The following refers to Python 3.3. >> >> I know that if you create a column of type 'bytea', psycopg2 accepts a >> variety of inputs, but always returns a 'memoryview'. >> >> I would like to know if it is possible, through some customisation >> option, >> to tell it to return 'bytes'. > > Yes: you can easily create a typecaster converting bytea data to bytes: > [..] Thanks very much, Daniele. I have tested it, and it works like a charm :-) Frank
В списке psycopg по дате отправления: