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
"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:
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
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
>
> 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
>
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
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 modify the call function *select batch_number()* as well.
How can I do th
On 12 Sep 2009, at 11:58, Alban Hertroys wrote:
On 12 Sep 2009, at 24:17, db.subscripti...@shepherdhill.biz wrote:
Hi,
I have a loop of the form:
FOR rec IN SELECT code FROM staff WHERE shiftgroup = NEW.groupe
ORDER BY code LOOP
WHILE sdate <= NEW.todate LOOP
SELECT IN
On 12 Sep 2009, at 24:17, db.subscripti...@shepherdhill.biz wrote:
Hi,
I have a loop of the form:
FOR rec IN SELECT code FROM staff WHERE shiftgroup = NEW.groupe
ORDER BY code LOOP
WHILE sdate <= NEW.todate LOOP
SELECT INTO starty,endy,nday resumetime,closetime,nextday F
Hi,
I have a loop of the form:
FOR rec IN SELECT code FROM staff WHERE shiftgroup = NEW.groupe ORDER
BY code LOOP
WHILE sdate <= NEW.todate LOOP
SELECT INTO starty,endy,nday resumetime,closetime,nextday FROM
shifts WHERE shift = NEW.shift;
restim
On Wed, Aug 27, 2008 at 05:14:46PM +0200, Ivan Sergio Borgonovo wrote:
> On Wed, 27 Aug 2008 14:47:24 +0100 Sam Mason <[EMAIL PROTECTED]> wrote:
> > OK, so it's the UPDATE that's taking the time. I'm not experienced
> > enough to say why though.
>
> I can't get it either.
> I'd say that:
> - use
On Wed, 27 Aug 2008 14:47:24 +0100
Sam Mason <[EMAIL PROTECTED]> wrote:
> On Wed, Aug 27, 2008 at 02:58:18PM +0200, Ivan Sergio Borgonovo
> wrote:
> > On Wed, 27 Aug 2008 12:45:42 +0100 Sam Mason <[EMAIL PROTECTED]>
> > wrote:
> > > Have you been vacuuming (non-full) between runs? and as always,
>
On Wed, Aug 27, 2008 at 02:58:18PM +0200, Ivan Sergio Borgonovo wrote:
> On Wed, 27 Aug 2008 12:45:42 +0100 Sam Mason <[EMAIL PROTECTED]> wrote:
> > Have you been vacuuming (non-full) between runs? and as always,
> > are the stats reasonably up to date?
>
> there is autovacuum running regularly an
On Wed, 27 Aug 2008 12:45:42 +0100
Sam Mason <[EMAIL PROTECTED]> wrote:
> On Wed, Aug 27, 2008 at 01:19:30PM +0200, Ivan Sergio Borgonovo
> wrote:
> > but this looks much slower than the function:
> > function: 113sec
> > vs.
> > single statement: 488sec
> > I repeated the test 3 times with simila
On Wed, Aug 27, 2008 at 01:19:30PM +0200, Ivan Sergio Borgonovo wrote:
> but this looks much slower than the function:
> function: 113sec
> vs.
> single statement: 488sec
> I repeated the test 3 times with similar results.
Have you been vacuuming (non-full) between runs? and as always, are the
sta
On Wed, 27 Aug 2008 10:32:43 +0200
Ivan Sergio Borgonovo <[EMAIL PROTECTED]> wrote:
> create or replace function UpdateAuthors()
> returns void
> as
> $$
> declare
> _row record;
> _ItemID bigint;
> _Authors varchar(1024);
> _Name varchar(50);
> begin
> _Authors:='';
> _ItemID:=null;
>
am Mon, dem 18.06.2007, um 14:59:34 +0200 mailte Stefan Schwarzer folgendes:
> Hi there,
>
> my app is creating views for a certain task; now, I would like to run
> on a regular basis a script which deletes these views. As they are
> named with the date/hour/min/sec-appendix to make each view
Stefan Schwarzer writes:
Is there any way via PHP to loop through the whole set of views to
delete those with a specific name?
See pg_views.
In particular the viewname column.
---(end of broadcast)---
TIP 5: don't forget to increase your free
Hi there,
my app is creating views for a certain task; now, I would like to run
on a regular basis a script which deletes these views. As they are
named with the date/hour/min/sec-appendix to make each view unique, I
don't know the names myself (Ok, I could stock the names in a
separate t
This is how I loop through a record:
for rec in (select * from yourtable where somevar=3) loop
--output the record
raise notice '%', rec.somevar
end loop;
--
Mark
On Jan 25, 2:46 pm, [EMAIL PROTECTED] ("Furesz Peter") wrote:
> Hello,
>
> How can I loop a PL/PgSQL recorset variable? The
Furesz Peter wrote:
> FOR v_tmp IN v_tmp_regi LOOP
> --I would like to work here with the old recordset!
> END LOOP;
> ^^
>-- This is not working !!!
How do you expect to loop one record?
In a recent thread (with a remarkably similar questio
On Thursday, January 25 Furesz Peter wrote:
>How can I loop a PL/PgSQL recorset variable? The example:
>DECLARE
>v_tmp_regi RECORD;
>v_tmp RECORD;
>BEGIN
> SELECT * INTO v_tmp_regi FROM sulyozas_futamido sf WHERE
>sf.termekfajta_id=
> a_termekfajta_id AND sf.mar
Hello,
How can I loop a PL/PgSQL recorset variable? The example:
DECLARE
v_tmp_regi RECORD;
v_tmp RECORD;
BEGIN
SELECT * INTO v_tmp_regi FROM sulyozas_futamido sf WHERE
sf.termekfajta_id=
a_termekfajta_id AND sf.marka_id=a_marka_id;
DELETE FROM sulyoz
On 1/25/07, Furesz Peter <[EMAIL PROTECTED]> wrote:
How can I loop a PL/PgSQL recorset variable? The example:
DECLARE
v_tmp_regi RECORD;
v_tmp RECORD;
BEGIN
SELECT * INTO v_tmp_regi FROM sulyozas_futamido sf WHERE
sf.termekfajta_id=
a_termekfajta_id AND sf.mar
Hello,
How can I loop a PL/PgSQL recorset variable? The example:
DECLARE
v_tmp_regi RECORD;
v_tmp RECORD;
BEGIN
SELECT * INTO v_tmp_regi FROM sulyozas_futamido sf WHERE
sf.termekfajta_id=
a_termekfajta_id AND sf.marka_id=a_marka_id;
DELETE FROM sulyozas_fu
Hi Andreas,
if it is possible, can you tell me what error I 've put in my first
function?
Thanks,
Mo
Hello group,
I've got a new problem where I hope someone can give me a solution.
I have witten a function which should give back a type created by me. To get
the data into the type, I have to go through a loop, which holds other
loops.
Simplified (not really), it looks like this:
CREATE OR REPL
Original Message From: Moritz Bayer
>But still the question:
>Is it possible to put a loop into a loop? Or doesn't it make sense at all?
I'm not sure what the OP was about, but Yes, it it possible to put a loop into
a loop. See:
http://www.postgresql.org/docs/8.2/static/plpgsql-control
am Mon, dem 22.01.2007, um 15:58:32 +0100 mailte Moritz Bayer folgendes:
>
> But still the question:
> Is it possible to put a loop into a loop? Or doesn't it make sense at all?
Yes, is possible, why not? And sometimes it make sense...
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/
OK, this looks better:
CREATE OR REPLACE FUNCTION getregistrationtagging()
RETURNS SETOF ty_usertracking AS
$BODY$
DECLARE objReturn ty_usertracking%rowtype;
BEGIN
for objReturn IN
SELECT date_part('day',trackdate) as ty_day,
date_part('month',trackdate) as ty_month
AM cc
pgsql-general@postgresql.org
Subject
Re: [GENERAL] loop with circular
Jessica M Salmon <[EMAIL PROTECTED]> writes:
> -is it true that when looping over query results in a plpgsql
> for..in..execute loop, several records are stored in memory at one time?
Yes, but that's got nothing to do with your issue.
> -if I then update one of the records currently i
Subject
Re: [GENERAL] loop with circular
Jessica M Salmon wrote:
Hi All.
I'm writing a plpgsql function that creates a table and loops over the
items in that table, using a FOR ... IN EXECUTE ... loop. The thing is, on
each iteration I update the table over which I am looping. Sometimes, the
result of this update makes it no longer ne
Hi All.
I'm writing a plpgsql function that creates a table and loops over the
items in that table, using a FOR ... IN EXECUTE ... loop. The thing is, on
each iteration I update the table over which I am looping. Sometimes, the
result of this update makes it no longer necessary/desirable to proce
following your indication I found what I was looking for...Thank you.
I made a simple trigger/function that:
on insert check if a particular field is already on one table if not it
will procede to make the insert otherwise not.
But it goes on loop. Now just because I do not have experience, I'm
36 matches
Mail list logo