[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Re: [OT] Psycopg help needed (sorry for OT)

From: Horst Herb
Subject: Re: [Gnumed-devel] Re: [OT] Psycopg help needed (sorry for OT)
Date: Mon, 19 Aug 2002 18:30:30 +1000
User-agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.1a) Gecko/20020611

Andreas Tille wrote:
On Mon, 19 Aug 2002, Karsten Hilbert wrote:

11th Commandment:
You shall not "select *".

:) - your are perfectly right here.

The long answer is:
Probably one of the things why Horst wants to move over to the
driver native interface - they usually offer .GetAsDict().

Hmm, never heard about such an interface - but a dict is exactly what
I would expect in this case.

Have a look at the gmPG source code - more specific the helper functions at the end of the module. There are functions that turn a result into a dictionary, if this is required.

Otherwise, you can read the DB-API which tells you that cursor.description will yield all information regarding fetched columns including column names, data types etc.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]