Re: Receiving many more rows than expected

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Receiving many more rows than expected
Дата
Msg-id 536CEDDB.9060701@aklaver.com
обсуждение исходный текст
Ответ на Re: Receiving many more rows than expected  (Vincent de Phily <vincent.dephily@mobile-devices.fr>)
Ответы Re: Receiving many more rows than expected
Список pgsql-general
On 05/09/2014 01:45 AM, Vincent de Phily wrote:
> On Thursday 08 May 2014 16:56:25 Adrian Klaver wrote:
>> On 05/08/2014 03:11 PM, Vincent de Phily wrote:
>>> On Thursday 08 May 2014 06:30:39 Adrian Klaver wrote:
>>>> On 05/08/2014 04:09 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



--
Adrian Klaver
adrian.klaver@aklaver.com


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Receiving many more rows than expected
Следующее
От: Vincent de Phily
Дата:
Сообщение: Re: Receiving many more rows than expected