Re: Rows from a stored procedure result are stringified

Поиск
Список
Период
Сортировка
От Christopher David Howie
Тема Re: Rows from a stored procedure result are stringified
Дата
Msg-id 4EF35BCD.60002@chrishowie.com
обсуждение исходный текст
Ответ на Re: Rows from a stored procedure result are stringified  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Список psycopg
On 12/22/2011 10:34 AM, Daniele Varrazzo wrote:
> On Wed, Dec 21, 2011 at 8:54 PM, Christopher David Howie
> <me@chrishowie.com> wrote:
>
> Hi Chris. Please consider subscribing to the ML, or I will have to
> authorize every single message of yours. After subscribing, you may
> also disable receiving mail if you want.

I may do that in the future, as there's a good change I'll have more
questions, but for now this will be my last message, because:

>> On 12/21/2011 03:14 PM, Daniele Varrazzo wrote:
> or access to the components of the returned type:
>
>     test=> select * from myfunc(1,4);
>      a |  b
>     ---+------
>      1 | x
>      2 | xx
>      3 | xxx
>      4 | xxxx
>     (4 rows)

This is exactly the solution I was looking for.  I'm not sure how I
missed it, the syntax is pretty obvious.  I didn't even notice when
fiddling with psql that "SELECT myfunc()" was in fact returning a string
and not many columns.  Thanks for the pointer.

The other information in your message was useful as well.  I will likely
be using composite types as columns soon and I'll need to map them to
Python types.  So thanks for the detailed explanation.  :)

Cheers,

--
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers

If you correspond with me on a regular basis, please read this document:
http://www.chrishowie.com/email-preferences/

PGP fingerprint: 2B7A B280 8B12 21CC 260A DF65 6FCE 505A CF83 38F5

------------------------------------------------------------------------
                    IMPORTANT INFORMATION/DISCLAIMER

This document should be read only by those persons to whom it is
addressed.  If you have received this message it was obviously addressed
to you and therefore you can read it.

Additionally, by sending an email to ANY of my addresses or to ANY
mailing lists to which I am subscribed, whether intentionally or
accidentally, you are agreeing that I am "the intended recipient," and
that I may do whatever I wish with the contents of any message received
from you, unless a pre-existing agreement prohibits me from so doing.

This overrides any disclaimer or statement of confidentiality that may
be included on your message.

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

Предыдущее
От: Daniele Varrazzo
Дата:
Сообщение: Re: Rows from a stored procedure result are stringified
Следующее
От: Jan Urbański
Дата:
Сообщение: psycopg2.connect change from a C function to module method