Re: [SQL] raise is not working

2004-09-21 Thread Tom Lane
"CHRIS HOOVER" <[EMAIL PROTECTED]> writes: > SQL_Str is defined as a varchar. Neither of the raise calls have done > anything, but I don't get any errors either. The only way RAISE EXCEPTION "isn't going to do anything" is if control doesn't get to it. My bet would be that you are invoking some

Re: [SQL] JOIN performance

2004-09-21 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Fixing this properly is a research project, and I haven't thought of any > quick-and-dirty hacks that aren't too ugly to consider :-( Just thinking out loud here. Instead of trying to peek inside the CASE couldn't the optimizer just wrap the non-strict expr

Re: [SQL] raise is not working

2004-09-21 Thread Josh Berkus
Chris, > I have tried setting both server_min_messages (all the way down to debug5), > and client_min_messages (to debug1), and I still do not get a responce. I > did bounce the server after these changes. Please paste your entire function definition, and a copy of your interactive session on p

[SQL] raise is not working

2004-09-21 Thread CHRIS HOOVER
Hello again everyone. I need some help once again. I am following the postgresql pl/pgsql docs and trying to have my function show me the query it is trying to run since it not returning the expected results. However, it does not appear that the raise option is working. Can anyone please point

Re: [SQL] Different topic

2004-09-21 Thread Dean Gibson (DB Administrator)
Ok, this is the third time I've sent this eMail; the other two times the mail was accepted (as shown by my postfix logs), but never appeared on the list. So, this time I've changed the subject field (was JOIN performance): Tom Lane wrote on 2004-09-20 22:19: In 7.3 only a view whose targetlist

Re: [SQL] Difference in DATEs

2004-09-21 Thread Dean Gibson (DB Administrator)
Tom Lane wrote on 2004-09-21 07:01: Sure it is: see 10th row in http://www.postgresql.org/docs/7.4/static/functions-datetime.html#OPERATORS-DATETIME-TABLE Forget the interval and compare to an integer. Thanks; that line is not present in the table in the 7.3.4 docs. -- Dean ---

Re: [SQL] Help with function

2004-09-21 Thread Stephan Szabo
On Tue, 21 Sep 2004, CHRIS HOOVER wrote: > Thanks a bunch for the pointers and help. > > One other hopefully quick question. > > How do you query using a variable containing the query? > > I'm trying to build a select statment based upon what parameters are being > passed to the function. > > somt

Re: [SQL] Help with function

2004-09-21 Thread CHRIS HOOVER
Thanks a bunch for the pointers and help. One other hopefully quick question. How do you query using a variable containing the query? I'm trying to build a select statment based upon what parameters are being passed to the function. somthing like this: Declare Param1 varchar; Param2 varchar; S

Re: [SQL] Difference in DATEs

2004-09-21 Thread Tom Lane
"Dean Gibson (DB Administrator)" <[EMAIL PROTECTED]> writes: > 3. x - y < INTERVAL '...' doesn't work (but then, the minus operator is not > defined in the manual for two DATE values). Sure it is: see 10th row in http://www.postgresql.org/docs/7.4/static/functions-datetime.html#OPERATORS-DATETIME

Re: [SQL] degradation in performance

2004-09-21 Thread Pierre-Frédéric Caillaud
6000 inserts, each in its own transaction, will be very long. Group your inserts in one transaction and it'll be faster (maybe 1-2 minutes). Have your program generate a tab-delimited text file and load it with COPY, you should be down to a few seconds. On Tue, 21 Sep 2004 13:27:43 +0200,

Re: [SQL] degradation in performance

2004-09-21 Thread Stephan Szabo
On Tue, 21 Sep 2004, Alain Reymond wrote: > I created a database with Postgres 7.3.4 under Linux RedHat 7.3 on a > Dell PowerEdge server. You should probably upgrade to the end of the 7.3 branch at the least (7.3.7). > One of the table is > resultats(numbil, numpara, mesure, deviation) > with a

Re: [SQL] degradation in performance

2004-09-21 Thread Martin Knipper
Am 21.09.2004 13:27 schrieb Alain Reymond: > > Do you have any idea how I can improve speed - apart from splitting > the table every 2 or 3 years which is the the aim of a database! > Drop the index before you insert the data and recreate it afterwards. Use the "copy from ..." command instead

[SQL] degradation in performance

2004-09-21 Thread Alain Reymond
Good afternoon, I created a database with Postgres 7.3.4 under Linux RedHat 7.3 on a Dell PowerEdge server. One of the table is resultats(numbil, numpara, mesure, deviation) with an index on numbil. Each select on numbil returns up to 60 rows (that means 60 rows for one numbil with 60 differ

[SQL] Difference in DATEs

2004-09-21 Thread Dean Gibson (DB Administrator)
Assume that x and y are of type DATE: 1. AGE( x, y ) < INTERVAL '...' works. 2. x < y + INTERVAL '...' works. 3. x - y < INTERVAL '...' doesn't work (but then, the minus operator is not defined in the manual for two DATE values). Question: Is the meaning of x - y well-defined? That is, is there