Re: For loop

From: "Ezequias R(dot) da Rocha" <ezequias(at)fastcon(dot)com(dot)br>
To: "Ezequias R(dot) da Rocha" <ezequias(at)fastcon(dot)com(dot)br>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: For loop
Date: 2007-03-13 13:00:30
Message-ID: 45F6A06E.7090104@fastcon.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Ezequias R. da Rocha escreveu:
> Hi list,
>
> I would like to test the power of processing of postgresql (and my
> server) by insert a large ammount of data on a table I have.
>
> I would like to know how to implement a For... loop . With it I think
> I could check the real power of my server.
>
> Ezequias
>
I tryed a way but it is not working. Please see it:

LOOP;
-- some computations
insert into carga (desc) values ('My Text');
IF count > 1000000 THEN
EXIT; -- exit loop
END IF;
END LOOP;

The postgresql reports the following error:
/
ERROR: syntax error at or near "LOOP"
SQL state: 42601
Character: 1/

In response to

  • For loop at 2007-03-13 12:47:56 from Ezequias R. da Rocha

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bart Degryse 2007-03-13 13:13:55 Re: For loop
Previous Message Ezequias R. da Rocha 2007-03-13 12:47:56 For loop