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
As you can see in the manual
(http://www.postgresql.org/docs/8.1/interactive/plpgsql-control-structures.html)
you have to remove the ; after the initial LOOP
LOOP
statements
IF i 100 THEN EXIT;
END LOOP;
Or you can try...
WHILE i = 100 LOOP
statements
END LOOP;
Or
They are not working well.
Allways the same error.
(if while)
ERROR: syntax error at or near WHILE
SQL state: 42601
Character: 1
(if for)
ERROR: syntax error at or near FOR
SQL state: 42601
Character: 1
(if loop)
ERROR: syntax error at or near LOOP
SQL state: 42601
Character: 1
I installed
Please post your complete CREATE FUNCTION statement. Error code 42601 refers to
some syntax error which probably occurs just before you start looping. To find
it I need to see more code.
Please don't mail me directly. Only mail to pgsql-sql@postgresql.org
Ezequias R. da Rocha [EMAIL
Ezequias R. da Rocha wrote:
They are not working well.
Allways the same error.
(if while)
ERROR: syntax error at or near WHILE
SQL state: 42601
Character: 1
You may have a problem in the code just _before_ these lines.
--
Alvaro Herrera
On Tuesday 13 March 2007 6:19 am, Ezequias R. da Rocha wrote:
They are not working well.
Allways the same error.
(if while)
ERROR: syntax error at or near WHILE
SQL state: 42601
Character: 1
(if for)
ERROR: syntax error at or near FOR
SQL state: 42601
Character: 1
(if loop)
ERROR:
I quetion one more time. I must have a function ? Isn't another way to
implement it without using functions ?
Ezequias
Bart Degryse escreveu:
Please post your complete CREATE FUNCTION statement. Error code 42601
refers to some syntax error which probably occurs just before you
start looping.
On 3/13/07, Ezequias R. da Rocha [EMAIL PROTECTED] wrote:
I quetion one more time. I must have a function ? Isn't another way to
implement it without using functions ?
Not in PostgreSQL. Here's a sample of something similar to what you were doing.
CREATE LANGUAGE plpgsql;
CREATE TABLE carga
AFAK you can also use them in eg CREATE TRIGGER and on the psql command prompt.
What are you trying to accomplish. When we understand that, maybe we can point
you in the right direction.
Ezequias R. da Rocha [EMAIL PROTECTED] 2007-03-13 14:30
I quetion one more time. I must have a function ?
am Tue, dem 13.03.2007, um 10:30:59 -0300 mailte Ezequias R. da Rocha
folgendes:
I quetion one more time. I must have a function ? Isn't another way to
implement it without using functions ?
Yes, you need a function. SQL doesn't know LOOPs.
And, please, no silly fullquote.
[100 lines
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
Ezequias R. da Rocha wrote:
Thank you all. The function from Jonah solves my problem.
Just a simple question:
One million of inserctions in *28,8* seconds with this kind of data
(timestamp|character varring (50)) is a good performance ?
I let my questions to DBAs from PostgreSQL.
I
I rewritte the Jonah's function to:
FOR iter IN 1 .. num_iter
LOOP
-- some computations
INSERT INTO carga (descricao) VALUES ('CardPass');
END LOOP;
My ID is now() by default
And it was in 23sec
After I changed the insert to:
INSERT INTO carga (id,descricao) VALUES
Hi list,
I had no problem with pgadmin 1.6.2 until I instal PostgreSQL 8.2.3
Now when I resize the column in any place the pgadmin crashes.
Another problem is that when I move the mouse over the table in the sql
dialog the columns are selected. I don't know if it is a problem of the
mouse but
Ezequias Rodrigues da Rocha wrote:
Hi list,
I had no problem with pgadmin 1.6.2 until I instal PostgreSQL 8.2.3
Now when I resize the column in any place the pgadmin crashes.
Another problem is that when I move the mouse over the table in the sql
dialog the columns are selected. I don't know
Hi list,
I would like to know if I set the debug mode to 2 (-l 2) in the pgAgent
connection string it could spend much cpu processing.
I have other things running in the server and I don't like to create problem
to others.
--
Ezequias Rodrigues da Rocha
http://ezequiasrocha.blogspot.com/
use
Ezequias Rodrigues da Rocha wrote:
Hi list,
I would like to know if I set the debug mode to 2 (-l 2) in the pgAgent
connection string it could spend much cpu processing.
I have other things running in the server and I don't like to create
problem to others.
Please stop cross posting to
Ok I will use only on error ok ?
-l 0
:)
Thank you
Dave Page escreveu:
Ezequias Rodrigues da Rocha wrote:
Hi list,
I would like to know if I set the debug mode to 2 (-l 2) in the
pgAgent connection string it could spend much cpu processing.
I have other things running in the server and
Ezequias R. da Rocha wrote:
Ok I will use only on error ok ?
-l 0
:)
In the normal case, yes, that is what I'd use (0 is the default in fact,
so you can omit the option altogether).
Regard,s Dave
---(end of broadcast)---
TIP 2: Don't 'kill
Hi All,
Sorry if this is the wrong list to ask this question.
My Vacuum's are running very very slow and expecially when vacuuming indexes
in large tables of size in 5-10 gigabytes,
can some one help me determine the parameters for postgres.conf which will
help me vacuum fast. I'm running
On 3/14/07, Sumeet [EMAIL PROTECTED] wrote:
Hi All,
Hi,
Sorry if this is the wrong list to ask this question.
General woould have been better :)
My Vacuum's are running very very slow and expecially when vacuuming indexes
in large tables of size in 5-10 gigabytes,
can some one help me
Hi list,
Could someone tell me in a simple way what does Maintence DB means ?
Regards
Ezequias
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so
(From the pgadmin documentation)
"The maintenance DB field is used to specify the initial database
that pgAdmin connects to, and that will be expected to have the pgAgent
schema and adminpack objects installed (both optional). On PostgreSQL
8.1 and above, the maintenance DB is normally called
The only info i have is
Apple xRaid drive array with 14 400GB drives for a total of 5 TB storage
I have around 10-15 indexes for each tables. does the number of indexes slow
down the vacuum process?
indexes are compund indexes on multiple fields.
-Sumeet
On 3/13/07, Andrej Ricnik-Bay [EMAIL
On Tue, 2007-03-13 at 15:48, Sumeet wrote:
On 3/13/07, Andrej Ricnik-Bay [EMAIL PROTECTED] wrote:
On 3/14/07, Sumeet [EMAIL PROTECTED] wrote:
Hi All,
Hi,
Sorry if this is the wrong list to ask this question.
General woould have been better
Sumeet [EMAIL PROTECTED] writes:
My Vacuum's are running very very slow and expecially when vacuuming indexes
in large tables of size in 5-10 gigabytes,
can some one help me determine the parameters for postgres.conf which will
help me vacuum fast. I'm running postgres on a server with 32 gigs
I am trying to batch-load a tab-separated CSV file:
psql -h lolek -U tes -d stockmarket -c copy history from
'/tmp/FTSE.csv' CSV;
ERROR: could not open file /tmp/FTSE.csv for reading: No such file or
directory
The file exists. Do I need to escape the quotes?
set-up: Postgres 8.1,
T E Schmitz wrote:
I am trying to batch-load a tab-separated CSV file:
psql -h lolek -U tes -d stockmarket -c copy history from
'/tmp/FTSE.csv' CSV;
ERROR: could not open file /tmp/FTSE.csv for reading: No such file or
directory
The file exists. Do I need to escape the quotes?
Is
On Tue, 13 Mar 2007 20:38:33 +
T E Schmitz [EMAIL PROTECTED] wrote:
I am trying to batch-load a tab-separated CSV file:
psql -h lolek -U tes -d stockmarket -c copy history from
'/tmp/FTSE.csv' CSV;
ERROR: could not open file /tmp/FTSE.csv for reading: No such file or
directory
On Tue, 2007-03-13 at 20:38 +, T E Schmitz wrote:
I am trying to batch-load a tab-separated CSV file:
psql -h lolek -U tes -d stockmarket -c copy history from
'/tmp/FTSE.csv' CSV;
ERROR: could not open file /tmp/FTSE.csv for reading: No such file or
directory
The file exists.
D'Arcy J.M. Cain wrote:
On Tue, 13 Mar 2007 20:38:33 +
T E Schmitz [EMAIL PROTECTED] wrote:
I am trying to batch-load a tab-separated CSV file:
psql -h lolek -U tes -d stockmarket -c copy history from
'/tmp/FTSE.csv' CSV;
ERROR: could not open file /tmp/FTSE.csv for reading: No such
Jure Kodzoman wrote:
On Tue, 2007-03-13 at 20:38 +, T E Schmitz wrote:
I am trying to batch-load a tab-separated CSV file:
psql -h lolek -U tes -d stockmarket -c copy history from
'/tmp/FTSE.csv' CSV;
ERROR: could not open file /tmp/FTSE.csv for reading: No such file or
directory
D'Arcy J.M. Cain wrote:
On Tue, 13 Mar 2007 20:38:33 +
T E Schmitz [EMAIL PROTECTED] wrote:
psql -h lolek -U tes -d stockmarket -c copy history from STDIN CSV
/tmp/FTSE.csv
Also, it's nopt happy about the date format : 2007/02/09
--
Regards,
Tarlika Elisabeth Schmitz
On 3/13/07, Ezequias R. da Rocha [EMAIL PROTECTED] wrote:
Could someone tell me in a simple way what does Maintence DB means ?
Ezequias,
Not trying to be a PITA here, because I'm more than happy to help.
But it seems like you ask a lot of questions that could easily be
answered if you read
On 3/13/07, T E Schmitz [EMAIL PROTECTED] wrote:
This is pretty ingenious!
Just a few minor problems:
- how does COPY know which column is which?
- how do I specify DELIMITER as TAB?
See:
http://www.postgresql.org/docs/8.2/static/sql-copy.html
Also, it's nopt happy about the date format :
35 matches
Mail list logo