[GENERAL] Stored Procedures woes

2004-08-19 Thread Andrew Hall
Hello, We are using a number of stored procedures that are called often from our client programs. I include one here as an example. The problem we are seeing is that when executing some of these that deal with a large number of records, they begin execution and never return. The process handling

Re: [GENERAL] Pass parameters to SQL script

2004-08-19 Thread Daniel Martini
Hi, Citing Fuchs Clemens [EMAIL PROTECTED]: is it possible to pass parameters to a SQL script, which I launch via the psql shell? yes In Oracle it works like that: sqlplus myscript.sql myschema and within the script I can use the parameter like this: CONCAT .

Re: [GENERAL] pg_dump feature request: Exclude tables?

2004-08-19 Thread Oliver Elphick
On Wed, 2004-08-18 at 20:11, Glen Parker wrote: Hmm, while you're at it, maybe you could make it accept wild cards or regexp or something :-) That should allow you to toss the -n parameter altogether (schema.*) if you wanted to. It would also be at least as good, IMO, to accept only

Re: libpq: passwords WAS: [GENERAL] scripting psql issues

2004-08-19 Thread Oliver Elphick
On Thu, 2004-08-19 at 08:30, Daniel Martini wrote: Hello list, Citing Alvaro Herrera [EMAIL PROTECTED]: The problem here is that the password can't be stored one-way-hash digested, because the cleartext version is needed to be sent to the server. Actually why this is so has been a

Re: [GENERAL] scripting psql issues

2004-08-19 Thread Oliver Elphick
On Wed, 2004-08-18 at 16:26, Bob Parkinson wrote: I've started to use the here document idea a lot when writing scripts to do tasks. #!/usr/local/bin/bash psql -d myDB EOSQL select foo update bar; delete from ... EOSQL If the here document is long and complicated, you should

Re: [GENERAL] Stored Procedures woes

2004-08-19 Thread Oliver Elphick
On Thu, 2004-08-19 at 10:53, Andrew Hall wrote: Hello, We are using a number of stored procedures that are called often from our client programs. I include one here as an example. The problem we are seeing is that when executing some of these that deal with a large number of records, they

Re: [GENERAL] Pass parameters to SQL script

2004-08-19 Thread Fuchs Clemens
Title: AW: [GENERAL] Pass parameters to SQL script thanks for tip - I'm nearly happy now. Now I want to concatenate a variable value with a hardcoded value in my script - something like: CREATE TABLE :myValue + _the_hardcoded_string .. Is this possible? thanks,

[GENERAL] Finally tsearch works ... somehow... remain a few questions

2004-08-19 Thread Marcel Boscher
For now i am almost statisfied with my tsearch2 installation war over night somehow it seems to work, finally... 3 probably easy questions remain... 1.) Is it possible to index already filled tables? 2.)Can i have seperated indexes for different columns in a table 3.) Can i create an extra Table

Re: [GENERAL] select count(*) from pg_stat_activity in V8.0.0

2004-08-19 Thread Tom Lane
Richard Huxton [EMAIL PROTECTED] writes: Anony Mous wrote: select count(*) from pg_stat_activity Do you have multiple live connections? My understanding of pg_stat_activity is that it can lag slightly behind the current state of the system. If memory serves, it's up to 500 msec behind.

Re: [GENERAL] possible bug in exception handling code? (postgres8.0beta)

2004-08-19 Thread Tom Lane
[EMAIL PROTECTED] writes: would compile, when in fact it should not. (or am I totally wrong here?) pl_exec.c has a exception label map which is used at execution, when the exception actually happens. Wouldn't it be preferable to use it at compile time? That is on my to-do list. One question

Re: [GENERAL] Stored Procedures woes

2004-08-19 Thread Tom Lane
Oliver Elphick [EMAIL PROTECTED] writes: We are using a number of stored procedures that are called often from our client programs. Are you somehow setting off an infinite recursion? How is this being called? I doubt it would be an infinite-recursion problem, as that would soon lead to

Re: libpq: passwords WAS: [GENERAL] scripting psql issues

2004-08-19 Thread Tom Lane
Oliver Elphick [EMAIL PROTECTED] writes: I think the password can't be stored hash-digested because it has to be encrypted with a salt established at runtime. If you could just send the same hash-digested password over and over, it would be no more secure than a plaintext one. [ looks at

Re: [GENERAL] Finally tsearch works ... somehow... remain a few

2004-08-19 Thread Oleg Bartunov
Marcel, On Thu, 19 Aug 2004, Marcel Boscher wrote: For now i am almost statisfied with my tsearch2 installation war over night somehow it seems to work, finally... what problems with installation ? Any additions,corrections to docs ? 3 probably easy questions remain... 1.) Is it possible

Re: [GENERAL] select count(*) from pg_stat_activity in V8.0.0

2004-08-19 Thread Anony Mous
Thanks, Richard. I've never seen this behaviour before in 7.4.3 and indeed it is the only connection to the back end at the time when the count is occurring. However, it would have had the connection for at least 30 seconds before requesting a count. Is there a better method of obtaining the

Re: [GENERAL] Pass parameters to SQL script

2004-08-19 Thread Peter Eisentraut
Am Donnerstag, 19. August 2004 15:39 schrieb Fuchs Clemens: Now I want to concatenate a variable value with a hardcoded value in my script - something like: CREATE TABLE :myValue + _the_hardcoded_string .. Option 1: \set tmp :myValue 'hardcoded' CREATE TABLE :tmp ... Option 2: CREATE

Re: libpq: passwords WAS: [GENERAL] scripting psql issues

2004-08-19 Thread Tino Wildenhain
Hi, Am Do, den 19.08.2004 schrieb Tom Lane um 16:44: Oliver Elphick [EMAIL PROTECTED] writes: I think the password can't be stored hash-digested because it has to be encrypted with a salt established at runtime. If you could just send the same hash-digested password over and over, it

Re: [GENERAL] Postgresql feature

2004-08-19 Thread Robert Treat
On Wed, 2004-08-18 at 13:53, John Sidney-Woollett wrote: Bit more info (from my own findings migrating from Oracle - Postgres) Jobs - NO, (but scheduled tasks can be implemented in other ways) There is a project on gborg (or maybe pgfoundry) called pgjobs which aims to create an oracle like

Re: [GENERAL] Pass parameters to SQL script

2004-08-19 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: If myValue is double quoted, then the values will automatically be concatenated by the backend parser, but for strange (SQL-standard) reasons you need a line break in between. That works for literals (single-quotes), but I don't think it applies to

[GENERAL] Postgresql 8.0 beta 1 - strange cpu usage statistics and slow vacuuming

2004-08-19 Thread Shelby Cain
I'm putting 8.0 through its paces and here are a few things I've noticed on the native win32 port running on my workstation (2.0g p4 w/256 megs of ram). Here is the output of vacuum verbose item: INFO: vacuuming public.item INFO: item: removed 246381 row versions in 24044

Re: libpq: passwords WAS: [GENERAL] scripting psql issues

2004-08-19 Thread Tom Lane
Tino Wildenhain [EMAIL PROTECTED] writes: PS: the hash would suit better when used in a challenge authorization, meaning the server sends a random key, let the client hash(random_key || md5( cleartext_password || username ) ) and compare it on server with hash(random_key ||

Re: [GENERAL] shared_buffers Question

2004-08-19 Thread Scott Marlowe
Is the memory freed up if you shut down and restart PostgreSQL? If not, then it might not be PostgreSQL that's directly causing the issue, but something like logging. What OS is this by the way? On Tue, 2004-08-17 at 15:10, Joe Lester wrote: Thanks for the suggestion Scott. I did a... find

Re: [GENERAL] BUG: 8.0 beta1 does not run on Windows 2000 Terminal Server

2004-08-19 Thread Bruce Momjian
Magnus Hagander wrote: 8.0 beta1 does not run on Windows 2000 Terminal Server. This is the http://pgfoundry.org/projects/pginstaller/ download from 08/09/2004. It ran OK for me on Win2K Pro, so I suspect this is caused by the terminal server stuff; I have experienced differences in

[GENERAL] Forwarding kerberos credentials

2004-08-19 Thread Mark Gibson
Hi, I'm having intermittent problems connecting to my PostgreSQL database from PHP, using Kerberos credentials forwarded from mod_auth_kerb. - User authenticates via mod_auth_kerb, (either Basic or Negotiate HTTP authenication) - Kerberos credentials are stored in a file that lives for the

Re: [GENERAL] Postgresql 8.0 beta 1 - strange cpu usage statistics and slow vacuuming

2004-08-19 Thread Tom Lane
Shelby Cain [EMAIL PROTECTED] writes: I'm putting 8.0 through its paces and here are a few things I've noticed on the native win32 port running on my workstation (2.0g p4 w/256 megs of ram). Here is the output of vacuum verbose item: DETAIL: CPU -1.-1612s/-1.99u sec elapsed 1434.79 sec.

Re: [GENERAL] Finally tsearch works ... somehow... remain a few

2004-08-19 Thread Gaetano Mendola
Oleg Bartunov wrote: Marcel, On Thu, 19 Aug 2004, Marcel Boscher wrote: For now i am almost statisfied with my tsearch2 installation war over night somehow it seems to work, finally... What does have tsearch2 that htdig doesn't have ( for index document I mean ) ? Regards Gaetano Mendola

Re: [GENERAL] select count(*) from pg_stat_activity in V8.0.0

2004-08-19 Thread Richard Huxton
Anony Mous wrote: Thanks, Richard. I've never seen this behaviour before in 7.4.3 and indeed it is the only connection to the back end at the time when the count is occurring. However, it would have had the connection for at least 30 seconds before requesting a count. Is there a better method of

Re: [GENERAL] Postgresql 8.0 beta 1 - strange cpu usage statistics and slow vacuuming

2004-08-19 Thread Shelby Cain
--- Tom Lane [EMAIL PROTECTED] wrote: My other concern is the length of time that vacuum runs when cost based vacuuming is disabled. Are you sure you had cost-based vac disabled? I tried to reproduce your experiment here. I saw some degradation in vacuuming speed but not nearly as

Re: [GENERAL] Finally tsearch works ... somehow... remain a few

2004-08-19 Thread Oleg Bartunov
On Thu, 19 Aug 2004, Gaetano Mendola wrote: Oleg Bartunov wrote: Marcel, On Thu, 19 Aug 2004, Marcel Boscher wrote: For now i am almost statisfied with my tsearch2 installation war over night somehow it seems to work, finally... What does have tsearch2 that htdig doesn't have (

Re: [GENERAL] Postgresql 8.0 beta 1 - strange cpu usage statistics and slow vacuuming

2004-08-19 Thread Tom Lane
Shelby Cain [EMAIL PROTECTED] writes: From looking at vacuum.c I gathered vacuum_cost_delay must be 0 to enable the feature - correct? Yeah, that's right --- delay=0 turns it off. Weird. Can anyone else reproduce the problem? regards, tom lane

Re: [GENERAL] BUG: 8.0 beta1 does not run on Windows 2000 Terminal Server

2004-08-19 Thread Glen Parker
Glen - can you confirm if this happens only on terminal server in Application Mode or if it also affects Remote Administration Mode? Can't confirm, I can only tell you that this particular one is in application mode. Glen ---(end of

Re: [GENERAL] Postgresql 8.0 beta 1 - strange cpu usage statistics and slow

2004-08-19 Thread Gaetano Mendola
Shelby Cain wrote: I'm putting 8.0 through its paces and here are a few things I've noticed on the native win32 port running on my workstation (2.0g p4 w/256 megs of ram). Here is the output of vacuum verbose item: INFO: vacuuming public.item INFO: item: removed 246381 row

Re: libpq: passwords WAS: [GENERAL] scripting psql issues

2004-08-19 Thread Tom Lane
Daniel Martini [EMAIL PROTECTED] writes: Now how would this work, if it would be possible to send hashed passwords from libpq: user sends username/password, this gets hashed by the cgi, then the hashed value is sent by libpq. Session id is generated and stored together with the hashed

Re: [GENERAL] unserializable transaction?

2004-08-19 Thread Tom Lane
s post [EMAIL PROTECTED] writes: Recently I posted notes on SERIALIZABLE transactions. In these notes I state that one should use SELECT FOR UPDATE on all accessed data items to execute SERIALIZABLE transactions. I now seem to have found a schedule that cannot be serialized in this way.

Re: [GENERAL] int8, primary key, seq scan

2004-08-19 Thread Tom Lane
Jeff Amiel [EMAIL PROTECTED] writes: I declared the compared value (draftid) as an int8, why should I have to cast it as such in the query to cause the optimizer to use the primary key? Seems like it should work (and it does work for me, in a quick test with 7.4.5). Could we see the full text

Re: [GENERAL] 8.0 release schedule?

2004-08-19 Thread Tom Lane
Julian Scarfe [EMAIL PROTECTED] writes: Any views on when an 8.0 release is likely? [ all together now... ] When it's ready. Seriously, if I had to guess I'd say sometime between September and December. It is too early in the beta cycle to be more specific than that.

[GENERAL] Indexes

2004-08-19 Thread Primoz
Hello, is there any way to speedup queryes like select ... from [table a] where [int field b] = [number] order by [datetime field c] desc limit [number]; with index on field b I get something, but pgsql afterwards resolves to sorting manually. partial indices with index on field c where

Re: [GENERAL] Indexes

2004-08-19 Thread Tom Lane
Primoz [EMAIL PROTECTED] writes: is there any way to speedup queryes like select ... from [table a] where [int field b] = [number] order by [datetime field c] desc limit [number]; For reasonably-small values of the LIMIT, what you want is (a) a two-column index on (b,c) (b)

Re: [GENERAL] Postgres and JBOSS

2004-08-19 Thread Hunter Hillegas
We use PostgresSQL 7.4 with JBoss without any trouble at all. I believe the datasource samples that come with JBoss include a PG example. We've found PostgreSQL to be an EXCELLENT companion to our Java server apps (JBoss based J2EE, straight servlet, and Apple's WebObjects). Hunter From: