Re: RealDictCursor behavior question - Mailing list psycopg

From Israel Brewster
Subject Re: RealDictCursor behavior question
Date
Msg-id 7B6B823E-11F9-46C3-A7E4-8195867A099A@flyravn.com
Whole thread Raw
In response to Re: RealDictCursor behavior question  (Christophe Pettus <xof@thebuild.com>)
List psycopg
On Apr 30, 2018, at 11:24 AM, Christophe Pettus <xof@thebuild.com> wrote:


On Apr 30, 2018, at 12:19, Israel Brewster <ibrewster@flyravn.com> wrote:
Yes, that is good reasoning *in general*, however in my particular use case, using `select *` makes things so much cleaner as to be worth the -again, in my use case - quite small risk. At least, until now that was the case. :-)

Remember that you can always introspect the column names, cache them locally, and then create whatever dict you want.  That way, it's 100% guaranteed to do the right thing for your application.

Good point. I'll have to do that :-) Should be easy enough, since I know which columns I need to mess with. Sometimes it's the simple solutions...

-----------------------------------------------
Israel Brewster
Systems Analyst II
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7293
-----------------------------------------------


--
-- Christophe Pettus
  xof@thebuild.com


psycopg by date:

Previous
From: Christophe Pettus
Date:
Subject: Re: RealDictCursor behavior question
Next
From: Karsten Hilbert
Date:
Subject: Re: RealDictCursor behavior question