Re: [GENERAL] “Loop” in plpgsql Function - PostgreSQL 9.2

2016-01-19 Thread mariusz
hello, On Tue, 2016-01-19 at 10:37 +1300, drum.lu...@gmail.com wrote: > I've created a function that allows me to do an huge update. > > But I need to limit this function. I need to do 50k rows (example) and > then stop it. After that I need to continue from the rows that I've > stopped... I'll

Re: [GENERAL] “Loop” in plpgsql Function - PostgreSQL 9.2

2016-01-19 Thread Harald Fuchs
"drum.lu...@gmail.com" writes: > So, the new plan is: > > 1 - Select 50.000 rows and gives it a batch number. > 2 - Select *MORE* 50,000 rows and gives it a *NEW* batch number. > 3 - Select *MORE* 50,000 rows and gives it a *NEW* batch number. Why so complicated? Here's a simplified example:

[GENERAL] Re: [GENERAL] “Loop” in plpgsql Function - PostgreSQL 9.2

2016-01-18 Thread drum.lu...@gmail.com
On 19 January 2016 at 11:44, dinesh kumar wrote: > Hello, > > On Mon, Jan 18, 2016 at 1:37 PM, drum.lu...@gmail.com < > drum.lu...@gmail.com> wrote: > >> I've created a function that allows me to do an huge update. >> >> But I need to limit this function. I need to do 50k rows (example) and >> th

[GENERAL] Re: [GENERAL] “Loop” in plpgsql Function - PostgreSQL 9.2

2016-01-18 Thread dinesh kumar
Hello, On Mon, Jan 18, 2016 at 1:37 PM, drum.lu...@gmail.com wrote: > I've created a function that allows me to do an huge update. > > But I need to limit this function. I need to do 50k rows (example) and > then stop it. After that I need to continue from the rows that I've > stopped... I'll ha

[GENERAL] Re: [GENERAL] “Loop” in plpgsql Function - PostgreSQL 9.2

2016-01-18 Thread drum.lu...@gmail.com
> > It is customary to restrict emails to a single list or at least make > others aware when you do have a legitmate need to cross-post. > > Specifically your post on -admin <“Break” in plpgsql Function - PostgreSQL > 9.2> > > Yes, it didn't belong on -admin in the first place but posting it here >

[GENERAL] Re: [GENERAL] “Loop” in plpgsql Function - PostgreSQL 9.2

2016-01-18 Thread David G. Johnston
On Mon, Jan 18, 2016 at 2:37 PM, drum.lu...@gmail.com wrote: > I've created a function that allows me to do an huge update. > > But I need to limit this function. I need to do 50k rows (example) and > then stop it. After that I need to continue from the rows that I've > stopped... I'll have to mo