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

2017-06-08 Thread marcinha rocha
On Thursday, June 8, 2017, marcinha rocha <marciaestefanidaro...@hotmail.com<mailto:marciaestefanidaro...@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

[GENERAL] Function with limit and offset - PostgreSQL 9.3

2017-06-08 Thread marcinha rocha
Hi guys! I have the following queries, which will basically select data, insert it onto a new table and update a column on the original table. CREATE or REPLACE FUNCTION migrate_data() RETURNS integer; declare row record; BEGIN FOR row IN EXECUTE ' SELECT id

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

2017-06-08 Thread marcinha rocha
On 6/8/2017 5:53 PM, marcinha rocha wrote: > Hi guys! I have the following queries, which will basically select > data, insert it onto a new table and update a column on the original > table. I'm sure your example is a gross simplification of what you're really doing, but if that's r