Re: Receiving many more rows than expected

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Vincent de Phily <vincent(dot)dephily(at)mobile-devices(dot)fr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Receiving many more rows than expected
Date: 2014-05-09 21:14:25
Message-ID: 536D4531.30807@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 05/09/2014 08:14 AM, Vincent de Phily wrote:
> On Friday 09 May 2014 08:01:47 Adrian Klaver wrote:
>> On 05/09/2014 01:45 AM, Vincent de Phily wrote:
>>> Before you grow suspicious of that conf_getint, the config is loaded once
>>> at program startup, and the overlarge results hapen together with normal
>>> results without having left the loop. Just in case I'm now logging the
>>> query string anyway; who knows...
>>
>> As proof of concept that the value can change in the loop:
>>
>>
>> In [17]: l = [1, 2, 3, 4, 5]
>>
>> In [18]: def getNumber():
>> return random.choice(l)
>> ....:
>>
>> In [19]: ct = 0
>>
>> In [20]: while ct < 5:
>> s = 'Lucky number is %d' % (getNumber(),)
>> ct += 1
>> print s
>> ....:
>> Lucky number is 5
>> Lucky number is 5
>> Lucky number is 4
>> Lucky number is 3
>> Lucky number is 2
>
> Sure, but that's not what I'm doing at all. My "str" % (somefunc(),) is
> executed outside the loop, not inside it. This is python, not lisp. The
> variable "query" is a plain string, not a reference to how that string was
> created.

My mistake, what I get for trying to throw something together while
heading out the door :(

>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2014-05-09 23:53:49 Re: Receiving many more rows than expected
Previous Message Randy Westlund 2014-05-09 20:11:51 Re: Enforce Symmetric Matrix