Re: [GENERAL] Is it possible to measure IO costs of a query in

2005-01-16 Thread Tzahi Fadida
10x, for the reply. I did read all the developer documentation and it got me close but not close enough. It turns out that on linux the io statistics per processes is not counted at all. There is however what is called laptop_mode where you want to find unecessary disk activity to save batteries.

Re: [GENERAL] PostgreSQL and WebObjects

2005-01-16 Thread Ralf Schuchardt
On Sun, 16 Jan 2005 01:13:58 -0500 Ken Tozier [EMAIL PROTECTED] wrote: Anybody using PostgreSQL with WebObjects on OS X 10.3.x? I'm having trouble setting it up and could use some pointers from anyone who has successfully gotten the two working together. I've done this a numerous times. You

Re: [GENERAL] PostgreSQL code for nested sets

2005-01-16 Thread PFC
I'm wondering if anyone has taken the code from http://www.dbazine.com/tropashko4.shtml and converted it to PostgreSQL? You can use the contrib/ltree type, which represents a path, and will be easier and faster to use. http://www.sai.msu.su/~megera/postgres/gist/ltree/ Create a table

Re: [GENERAL] PostgreSQL 8 on windows very slow

2005-01-16 Thread Raymond O'Donnell
On 11 Jan 2005 at 8:16, lol wrote: I use zeoslib 6.1.5 for Delphi 7. I have also tried 6.5.1-alpha. It's faster (especially with firebird). I will take a look at dbExpress. I've recently started using dbExpress with Delphi 6 for a desktop client application, and have found it fast and easy

Re: [GENERAL] Index optimization ?

2005-01-16 Thread Bo Lorentsen
Tom Lane wrote: http://developer.postgresql.org/docs/postgres/xfunc-volatility.html Ok, thanks I see why there is these three differant function types, but I don't quite understand why the value from a volatile function, can't be used as a index key. Is this because there is no return type

Re: [GENERAL] Index optimization ?

2005-01-16 Thread Michael Glaesemann
On Jan 17, 2005, at 0:25, Bo Lorentsen wrote: Tom Lane wrote: http://developer.postgresql.org/docs/postgres/xfunc-volatility.html Ok, thanks I see why there is these three differant function types, but I don't quite understand why the value from a volatile function, can't be used as a index key.

Re: [GENERAL] Index optimization ?

2005-01-16 Thread Bo Lorentsen
Michael Glaesemann wrote: I don't believe it has necessarily anything to do with the return type, but rather the return value. An index only works if you know what the value is, and the return value for a volatile function is not guaranteed to be the same for given parameters. Here's a

Re: [GENERAL] Index optimization ?

2005-01-16 Thread Ragnar Hafstað
On Sun, 2005-01-16 at 16:25 +0100, Bo Lorentsen wrote: [about a volatile function in a where clause not generating index scan] Will the only possible way to fix this be to make a volatile function with a return type (I know this is not possible now, but in theory) ? this has nothing to do

Re: [GENERAL] Index optimization ?

2005-01-16 Thread Bo Lorentsen
Ragnar Hafstað wrote: this has nothing to do with the return type. a volatile function is a function that is not garanteed to return the same value given same input parameters, (such as currval()). when a volatile function is used thus: SELECT * FROM mytable WHERE col=myvolatilefunc(); the

Re: [GENERAL] Index optimization ?

2005-01-16 Thread Martijn van Oosterhout
On Sun, Jan 16, 2005 at 05:30:22PM +0100, Bo Lorentsen wrote: One could conceivably attempt to make a functional index using plus_random(), but the result it gives every time is indeterminant. How would you be able to usefully search for values in an index that is based on this function?

Re: [GENERAL] Index optimization ?

2005-01-16 Thread Ragnar Hafstað
On Sun, 2005-01-16 at 17:45 +0100, Bo Lorentsen wrote: Ragnar Hafstað wrote: when a volatile function is used thus: SELECT * FROM mytable WHERE col=myvolatilefunc(); the planner must call the function once per table row, and assume possibly different return values each time, so an indexscan

Re: [GENERAL] Index optimization ?

2005-01-16 Thread Roman Neuhauser
# kleptog@svana.org / 2005-01-16 17:48:08 +0100: On Sun, Jan 16, 2005 at 05:30:22PM +0100, Bo Lorentsen wrote: One could conceivably attempt to make a functional index using plus_random(), but the result it gives every time is indeterminant. How would you be able to usefully search for

Re: [GENERAL] ntfs for windows port rc5-2

2005-01-16 Thread J. Greenlees
Magnus Hagander wrote: rc5-2 msi will not install at all on a fat32 filesystem even without initialising the database. Really? The code for checking the filesystem type is only executed if you chose to initdb, so I really don't see this happening. Exactly what message do you get? Log in the temp

Re: [GENERAL] Index optimization ?

2005-01-16 Thread Tom Lane
Ragnar =?ISO-8859-1?Q?Hafsta=F0?= [EMAIL PROTECTED] writes: On Sun, 2005-01-16 at 17:45 +0100, Bo Lorentsen wrote: Why not use the index scan for every row, is this a limit in the planner ? I think there is something in the planner I don't understand :-) the planner will just use the plan it

Re: [GENERAL] Index optimization ?

2005-01-16 Thread Bo Lorentsen
Martijn van Oosterhout wrote: No, it depends on your interpretation of the query. Note, I'm not up with the SQL standard so maybe it doesn't work like this, but this is what I think the problem is. I just try to learn, so that is ok :-) Tom gave me a solution that works, so now I struggle to

Re: [GENERAL] Index optimization ?

2005-01-16 Thread Bo Lorentsen
Tom Lane wrote: It has nothing to do with speed, it has to do with giving the correct answer. We define correct answer as being the result you would get from a naive interpretation of the SQL semantics --- that is, for every row in the FROM table, actually execute the WHERE clause, and return the

Re: [GENERAL] Index optimization ?

2005-01-16 Thread Ragnar Hafstað
On Sun, 2005-01-16 at 14:11 -0500, Tom Lane wrote: Ragnar =?ISO-8859-1?Q?Hafsta=F0?= [EMAIL PROTECTED] writes: On Sun, 2005-01-16 at 17:45 +0100, Bo Lorentsen wrote: Why not use the index scan for every row, is this a limit in the planner ? I think there is something in the planner I don't

Re: [GENERAL] ntfs for windows port rc5-2

2005-01-16 Thread Magnus Hagander
rc5-2 msi will not install at all on a fat32 filesystem even without initialising the database. Really? The code for checking the filesystem type is only executed if you chose to initdb, so I really don't see this happening. Exactly what message do you get? Log in the temp install dir:

Re: [GENERAL] Index optimization ?

2005-01-16 Thread Florian G. Pflug
Bo Lorentsen wrote: So if the random function was stable, you either get all or none, as et gets executed only ones ? An indexscan is a legal optimization only if the function(s) in the WHERE clause are all STABLE or better. This is because the index access code will only evaluate the righthand

Re: [GENERAL] ntfs for windows port rc5-2

2005-01-16 Thread J. Greenlees
Magnus Hagander wrote: rc5-2 msi will not install at all on a fat32 filesystem even without initialising the database. Really? The code for checking the filesystem type is only executed if you chose to initdb, so I really don't see this happening. Exactly what message do you get? Log in the

Re: [GENERAL] Index optimization ?

2005-01-16 Thread Tom Lane
Bo Lorentsen [EMAIL PROTECTED] writes: Tom Lane wrote: SELECT * FROM mytable WHERE random() 0.1; If we evaluated random() only once in this query, we would get either all or none of the rows, clearly not the right answer. So if the random function was stable, you either get all or

[GENERAL] Problem with win32 installer for PG 8.0

2005-01-16 Thread Tony Caduto
Hi, I installed beta 2 a couple of months ago, and today I installed RC 5 and it seems there is no way to tell the installer where to actually install, so I could not re use my data cluster from the beta 2(with out renaming the directory to the same name as what the installer would install).

Re: [GENERAL] Index optimization ?

2005-01-16 Thread Greg Stark
Florian G. Pflug [EMAIL PROTECTED] writes: Lets say, you have an query select * from table where field = function(). Maybe this would be clearer with a more egregious example of volatility. Say you had a function odd() that returns 1 and 0 alternating. That is, it returns 1 the first time

Re: [GENERAL] Problem with win32 installer for PG 8.0

2005-01-16 Thread Tzahi Fadida
I had this problem too, I am not sure why it happens. I am just guessing but I think its because of XP sp2. If you want to use the latest ms installer, at least at this point, you must install sp2. Anyway, what I did is something very funny. I opened the pg installer many times and then opened the

[GENERAL] Iis there anyway to do this(see in message)

2005-01-16 Thread Tony Caduto
Hi, Just wondering if there is a way to monitor the SQL that is executed inside a PL/pgsql function? I can see some SQL via the stats view, but it does not show the sql that is being executed in a function. The reason I ask is it would make debugging large complex functions much easier. I get a

Re: [GENERAL] Iis there anyway to do this(see in message)

2005-01-16 Thread Michael Fuhr
On Sun, Jan 16, 2005 at 07:00:42PM -0600, Tony Caduto wrote: Just wondering if there is a way to monitor the SQL that is executed inside a PL/pgsql function? I can see some SQL via the stats view, but it does not show the sql that is being executed in a function. You can get some logging

Re: [GENERAL] Iis there anyway to do this(see in message)

2005-01-16 Thread Madison Kelly
Tony Caduto wrote: Hi, Just wondering if there is a way to monitor the SQL that is executed inside a PL/pgsql function? I can see some SQL via the stats view, but it does not show the sql that is being executed in a function. The reason I ask is it would make debugging large complex functions

Re: [GENERAL] Postgresql 8.0 and Cancel/Kill backend functions

2005-01-16 Thread Stuart Bishop
Magnus Hagander wrote: The cancel function is implemented. See http://developer.postgresql.org/docs/postgres/functions-admin.html#FUNCT IONS-ADMIN-SIGNAL-TABLE. Kill function was considered too dangerous. Pity - I would have loved this for my test harnesses. I need to drop and recreate the

[GENERAL] pgpsql help

2005-01-16 Thread LENGYEL Zoltan
Hi, I have a pgpsql function: create or replace function new_uri(varchar,varchar,varchar) returns integer as ' declare src alias for $1; tit alias for $2; uri alias for $3; article_id integer := nextval(''articleid''); src_id integer; state_id integer; urit_id integer; begin select

Re: [GENERAL] pgpsql help

2005-01-16 Thread Mike G.
Maybe it is because 'name' is a sql 92/99 non-reserved / key word? On Mon, Jan 17, 2005 at 05:46:20AM +0100, LENGYEL Zoltan wrote: Hi, I have a pgpsql function: create or replace function new_uri(varchar,varchar,varchar) returns integer as ' declare src alias for $1; tit alias for

Re: [GENERAL] pgpsql help

2005-01-16 Thread Michael Fuhr
On Mon, Jan 17, 2005 at 05:46:20AM +0100, LENGYEL Zoltan wrote: uri alias for $3; ... insert into uri (articleid,uri,uritype) values (article_id,uri,urit_id); PostgreSQL 8.0 will give more context for the error, making it easier to spot the problem: ERROR: syntax error at or near $1 at

Re: [GENERAL] pgpsql help

2005-01-16 Thread Tom Lane
Mike G. [EMAIL PROTECTED] writes: Maybe it is because 'name' is a sql 92/99 non-reserved / key word? No, it's because of careless choice of plpgsql variable names. declare uri alias for $3; ... insert into uri (articleid,uri,uritype) values (article_id,uri,urit_id); ^^^

[GENERAL] deleting from arrays

2005-01-16 Thread mstory
I've searched the documentation for a simple way to delete a single value from an array, i've come up with a complecated way to do it, but was wondering if there was some simple command to remove a single value from an array, where the position of the value in the array is unknown. thanks,

Re: [GENERAL] Cursor bug?

2005-01-16 Thread Mike G.
On Fri, Jan 14, 2005 at 01:28:47PM +0100, Martijn van Oosterhout wrote: On Thu, Jan 13, 2005 at 04:35:04PM -0600, Mike G. wrote: thank you. I use the cursor because I really do an update against a different table based on a value from the select in the original table. I am eagerly

Re: [GENERAL] deleting from arrays

2005-01-16 Thread Michael Fuhr
On Sun, Jan 16, 2005 at 11:56:04PM -0600, [EMAIL PROTECTED] wrote: I've searched the documentation for a simple way to delete a single value from an array, i've come up with a complecated way to do it, but was wondering if there was some simple command to remove a single value from an array,

[GENERAL] Call for Beta Testers (PG Lightning Admin)

2005-01-16 Thread Tony Caduto
If anyone is interested in beta testing a new win32 based admin tool for Postgresql 8.x please sign up here: http://www.amsoftwaredesign.com/betatest.html Screen shots are available here: http://www.amsoftwaredesign.com/pg_ss.asp.asp We will be accepting 30 beta testers and each tester will