Re: [GENERAL] Function with limit and offset - PostgreSQL 9.3

Поиск
Список
Период
Сортировка
От marcinha rocha
Тема Re: [GENERAL] Function with limit and offset - PostgreSQL 9.3
Дата
Msg-id CY1PR18MB0490D612F30BDD2D7AA4606FAFCE0@CY1PR18MB0490.namprd18.prod.outlook.com
обсуждение исходный текст
Ответ на Re: [GENERAL] Function with limit and offset - PostgreSQL 9.3  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: [GENERAL] Function with limit and offset - PostgreSQL 9.3
Список pgsql-general

On Thursday, June 8, 2017, marcinha rocha <marciaestefanidarocha@hotmail.com> wrote:

On my original select, the row will have migrated = false. Maybe All I need to put is a limit 2000 and the query will do the rest?


You shoud try to avoid the for loop, 

Why?

but yes a limit 2000 on the for loop query should work since the migrated flag will ensure the same rows aren't selected again.

David J. 


Ok, cool!

Now, how do tell the function to return the number of touched rows? On this case, it should always be 2000.

Thanks!

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: [GENERAL] Function with limit and offset - PostgreSQL 9.3
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: [GENERAL] Function with limit and offset - PostgreSQL 9.3