Re: [GENERAL] Postgres mystery

2005-03-30 Thread Shaun Clements
Hi Guys Thanks again for your responses. You were all RIGHT .. again! a null column was returned, which bombed out the stored procedure. This was resolved using ur advice. Kind Regards,Shaun Clements B.Com (Hons) IST Software Developer Relyant Group ITBusiness ConneXion (Pty) LtdAs

[GENERAL] Empty date

2005-03-30 Thread Szmutku Zoltán
Hi , Thanks your previous help. I have a new question : how to store emptyvalue to date field ? ( I always get error message, in vain use any format)In my client be empty value for date fields (' . . ') , and Iwould like to use NULL values and empty values also. Thanks : Zoltan

Re: [GENERAL] Empty date

2005-03-30 Thread Richard Huxton
Szmutku Zoltán wrote: Hi , Thanks your previous help. I have a new question : how to store empty value to date field ? ( I always get error message, in vain use any format ) In my client be empty value for date fields ('. . ') , and I would like to use NULL values and empty values also. How

[GENERAL] Drivers for Other Languages

2005-03-30 Thread Gordan Bobic
Hi, How difficult is it to write a driver for pgsql (via network or UNIX domain sockets) for an as yet unsupported language? Specifically, I'd like a driver for JavaScript, for use with Mozilla JSLib/XPCShell. I presume there isn't one already, so I guess I'll have to write one. So, where can

Re: [GENERAL] Drivers for Other Languages

2005-03-30 Thread Mike Rylander
On Wed, 30 Mar 2005 12:07:06 +0100, Gordan Bobic [EMAIL PROTECTED] wrote: Hi, How difficult is it to write a driver for pgsql (via network or UNIX domain sockets) for an as yet unsupported language? Specifically, I'd like a driver for JavaScript, for use with Mozilla JSLib/XPCShell. I

Re: [GENERAL] Drivers for Other Languages

2005-03-30 Thread Gordan Bobic
Mike Rylander wrote: On Wed, 30 Mar 2005 12:07:06 +0100, Gordan Bobic [EMAIL PROTECTED] wrote: Hi, How difficult is it to write a driver for pgsql (via network or UNIX domain sockets) for an as yet unsupported language? Specifically, I'd like a driver for JavaScript, for use with Mozilla

[GENERAL] Postgres plpgsql

2005-03-30 Thread Shaun Clements
Title: [GENERAL] Postgres plpgsql Im finding a problem with updating in PGPLSQL Can anyone find anything wrong with this code below. It appears Postgres isnt picking up a change in the dynamic first column. So the same column is being updated. . snip EXECUTE ''UPDATE TABLENAME SET

Re: [GENERAL] Postgres plpgsql

2005-03-30 Thread Richard Huxton
Shaun Clements wrote: Im finding a problem with updating in PGPLSQL Can anyone find anything wrong with this code below. It appears Postgres isnt picking up a change in the dynamic first column. So the same column is being updated. . snip EXECUTE ''UPDATE TABLENAME SET

Re: [GENERAL] plperl doesn't release memory

2005-03-30 Thread FERREIRA William (COFRAMI)
Title: RE: [GENERAL] plperl doesn't release memory i have a similar problem i'm running PostgreSQL on a PIV with 1GO and Windows 2000 NT i have a large database and a big traitment taking more than 4 hours. during the first hour postgresql use as much memory as virtual memory and i find this

Re: [GENERAL] Postgres plpgsql

2005-03-30 Thread Shaun Clements
Title: RE: [GENERAL] Postgres plpgsql Hi Richard Thanks for your help. Im stuck on this statement. Am I missing the '' ??? snip PERFORM distinct COLUMN1 FROM TABLE where COLUMN1 = || quote_literal(VARIABLE1)'' ||'' AND COLUMN2 = ||quote_literal(VARIABLE2)||; IF NOT FOUND THEN

Re: [GENERAL] Postgres mystery

2005-03-30 Thread Berend Tober
Michael Fuhr wrote: On Wed, Mar 30, 2005 at 09:11:09AM +0200, Shaun Clements wrote: Can anyone tell me what the problem is here: I am inserting into a table via a stored procedure, to a few columns within the table and postgres is throwing a CANNOT EXECUTE NULL QUERY. EXECUTE ''INSERT INTO

Re: [GENERAL] Zombie processes

2005-03-30 Thread Peterson, Bjorn
My coworkers and I studied the EXPLAIN and EXPLAIN ANALYZE output for this query and determined that the query planner seemed to be causing problems with this query. By calling set enable_nestloop = off before executing our query we were able to get the execution time down to under 2 minutes,

[GENERAL] Postgres Processing Help !!!!

2005-03-30 Thread Carlos Roberto Chamorro Mostac
Hello to all, I have a problem with the use of temporary tables to have if somebody has an idea. Handling an application that it requires to process 6,000 registries Parents and the processing of each one requires to process N registries Children; Each teacher is sent to process in an own

[GENERAL] libpq usage in Samba

2005-03-30 Thread Fernando Schapachnik
I'm trying to figure out why Samba is failing at high loads if using Postgres as a backend (7.3.9 in my setup). On startup in makes one connection only against the database which is shared among all the Samba processes. In turn, each issue a PQexec() over the same connection (a SELECT, actually).

[GENERAL] Ayuda con procesamiento en Postgres !!!!

2005-03-30 Thread Carlos Roberto Chamorro Mostac
Hola a todos, tengo un problema con el uso de tablas temporales haber si alguien tiene una idea. Manejo una aplicacion que requiere procesar 6.000 registros Padres y el procesamiento de cada uno requiere procesar N registros Hijos; Cada maestro es enviado a procesar en una sesion propia (no

Re: [GENERAL] Postgres plpgsql

2005-03-30 Thread John DeSoi
On Mar 30, 2005, at 9:34 AM, Shaun Clements wrote: PERFORM distinct COLUMN1 FROM TABLE where COLUMN1 = || quote_literal(VARIABLE1)'' ||'' AND COLUMN2 = ||quote_literal(VARIABLE2)||; The first one you posted looked correct. This line above seems to have problems. I think you want

Re: [GENERAL] libpq usage in Samba

2005-03-30 Thread Doug McNaught
Fernando Schapachnik [EMAIL PROTECTED] writes: I'm trying to figure out why Samba is failing at high loads if using Postgres as a backend (7.3.9 in my setup). On startup in makes one connection only against the database which is shared among all the Samba processes. In turn, each issue a

Re: [GENERAL] Zombie processes

2005-03-30 Thread Peterson, Bjorn
Richard- The prepare/execute problem would make sense to me, except that all of the parameters in the query are integers and are being appended to the actual query string (for various reasons) prior to calling prepareStatement() rather than being set as parameters. The planner should have

Re: [GENERAL] plperl doesn't release memory

2005-03-30 Thread Sean Davis
As I understand it, a single execution of a pl/perl function will not be affected by the perl memory issue, so I don't think that is your problem. My guess is that you are reading a large query into perl, so the whole thing will be kept in memory (and you can't use more memory than you have).

Re: [GENERAL] Upgrade data

2005-03-30 Thread Scott Marlowe
On Wed, 2005-03-30 at 01:33, Richard Huxton wrote: josue wrote: Hello list, I need to upgrade my dbs from 743 to 801, current data size is around 5GB, I've tried this way: ./pg_dump -d dbtest -p 9980 | ./psql -d template1 -p 9981 but is too slow, any idea or suggestion to

Re: [GENERAL] Zombie processes

2005-03-30 Thread Richard Huxton
Peterson, Bjorn wrote: My coworkers and I studied the EXPLAIN and EXPLAIN ANALYZE output for this query and determined that the query planner seemed to be causing problems with this query. By calling set enable_nestloop = off before executing our query we were able to get the execution time down

Re: [GENERAL] Upgrade data

2005-03-30 Thread josue
Scott Marlowe wrote: On Wed, 2005-03-30 at 01:33, Richard Huxton wrote: josue wrote: Hello list, I need to upgrade my dbs from 743 to 801, current data size is around 5GB, I've tried this way: ./pg_dump -d dbtest -p 9980 | ./psql -d template1 -p 9981 but is too slow, any idea or suggestion to

[GENERAL] Is the FTP server down?

2005-03-30 Thread Larry White
I get time out errors from all mirrors when trying to download 8.0 win binaries. Apologies if this is the wrong forum for this. thanks. ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your

[GENERAL] limited disk space

2005-03-30 Thread David Parker
We need to run a server (7.4.5, Solaris 9/Intel) in an environment with a defined limit on disk size. We know basically the set of data we will be working with, and can size the disk space accordingly, but there will be a fair amount of update churn in the data. We are running autovacuum,

Re: [GENERAL] Oracle Migration. Don't Care about the Corbomite Maneuver, Spock.

2005-03-30 Thread Bruno Wolff III
On Wed, Mar 30, 2005 at 00:35:25 -, Mohan, Ross [EMAIL PROTECTED] wrote: Any pointers? The online documentation is very good. For generic Postrges questions, that is probably your best resource. There may be better places to get answers about questions on converting from Oracle to

[GENERAL] Catch of ERROR in PLPGSQL

2005-03-30 Thread Shaun Clements
Hi All Does anyone know if Postgres supports Catching of errors, from an EXECUTE, for Procedural Language Postgres. Thanks in advance Kind Regards,Shaun Clements

Re: [GENERAL] Catch of ERROR in PLPGSQL

2005-03-30 Thread Richard Huxton
Shaun Clements wrote: Hi All Does anyone know if Postgres supports Catching of errors, from an EXECUTE, for Procedural Language Postgres. In version 8, yes. See the manuals (35.7.5. Trapping Errors) for details. -- Richard Huxton Archonet Ltd ---(end of

Re: [GENERAL] Catch of ERROR in PLPGSQL

2005-03-30 Thread Cristian Prieto
Try a Begin ... block to watch ... Exception When error_code then ... What to do ... End; block, it works to me, it is better explained in the manual.. - Original Message - From: Richard Huxton dev@archonet.com To: Shaun Clements [EMAIL PROTECTED] Cc:

Re: [GENERAL] limited disk space

2005-03-30 Thread Peter Eisentraut
David Parker wrote: Is anybody running postgres in a similar constrained environment, or are there any general tips on controlling disk usage that somebody could point me to? PostgreSQL is not particularly tuned to such scenarios. The only chance you have to control disk usage is to vacuum

Re: [GENERAL] Upgrade data

2005-03-30 Thread josue
I did a pg_dumpall and this sentence to restore it back ./psql template1 -U postgres -p 9981 /home2/tmp/dbtest.tar and got this error cannot allocate memory for output buffer dbtest.tar is around 1.7 Gb, could anyone please bring some help to update my 7.4 db to 8.0 Thanks in advance, --

[GENERAL] what's wrong with postgres 8

2005-03-30 Thread vinita bansal
Hi, I have a 64 bit Linux box with 32GB RAM and disk space approx 450 GB. I am running a benchmark using filesystem type ext3 with data=writeback both on Postgres 7 and 8. Time taken for benchmark run is very less compared to the one on Postgres 8. I am esentially trying to get performance

Re: [GENERAL] Oracle Migration. Don't Care about the Corbomite Maneuver, Spock.

2005-03-30 Thread Mohan, Ross
BW - Thanksnow that it's downloaded and printing..i see what you mean. And I agree. I am utterly STUNNED and happy to see PG uses GA for query optimization; that, by itself, just makes this whole process that much more fun... - RM -Original Message- From: Bruno Wolff III

Re: [GENERAL] Is the FTP server down?

2005-03-30 Thread Magnus Hagander
I get time out errors from all mirrors when trying to download 8.0 win binaries. Apologies if this is the wrong forum for this. I just tried a couple, and they all seem to be working. Perhaps you have a firewall that's blocking you out of ftp connections? //Magnus

[GENERAL] Restore to a database with another name?

2005-03-30 Thread phil campaigne
Hi All, I want to move my development database (7.2.3) to my production server but the production server database has a different name. What is the procedure for restoring a database pg_dump to another machine with a different database name? Thanks in advance, Phil

Re: [GENERAL] Restore to a database with another name?

2005-03-30 Thread Scott Marlowe
On Wed, 2005-03-30 at 14:28, phil campaigne wrote: Hi All, I want to move my development database (7.2.3) to my production server but the production server database has a different name. What is the procedure for restoring a database pg_dump to another machine with a different database

Re: [GENERAL] [ODBC] delphi access question?

2005-03-30 Thread Raymond O'Donnell
On 30 Mar 2005 at 15:15, Joel Fradkin wrote: I can run a sql statement ok, even in sql builder I see all the fields. But the returned result set appears to be missing some of the fields. Probably a silly question, but do you have all the fields SELECTed in the SQL statement in the TQuery (or

Re: [GENERAL] Debugging deadlocks

2005-03-30 Thread frank
On Sun, Mar 27, 2005 at 01:37:44AM -0700, Michael Fuhr wrote: [] The current implementation supports only exclusive row-level locks (SELECT FOR UPDATE), but I think Alvaro might be working on shared row-level locks for a future release. Hmm ... are you saying that SELECT FOR UPDATE exquires an

Re: [GENERAL] Restore to a database with another name?

2005-03-30 Thread phil campaigne
Scott Marlowe wrote: On Wed, 2005-03-30 at 14:28, phil campaigne wrote: Hi All, I want to move my development database (7.2.3) to my production server but the production server database has a different name. What is the procedure for restoring a database pg_dump to another machine with a

Re: [GENERAL] Restore to a database with another name?

2005-03-30 Thread Lonni J Friedman
On Wed, 30 Mar 2005 15:58:02 -0500, phil campaigne [EMAIL PROTECTED] wrote: Scott Marlowe wrote: On Wed, 2005-03-30 at 14:28, phil campaigne wrote: Hi All, I want to move my development database (7.2.3) to my production server but the production server database has a different name.

Re: [GENERAL] Debugging deadlocks

2005-03-30 Thread Michael Fuhr
On Wed, Mar 30, 2005 at 10:59:52PM +0200, [EMAIL PROTECTED] wrote: On Sun, Mar 27, 2005 at 01:37:44AM -0700, Michael Fuhr wrote: The current implementation supports only exclusive row-level locks (SELECT FOR UPDATE), but I think Alvaro might be working on shared row-level locks for a future

Re: [GENERAL] Restore to a database with another name?

2005-03-30 Thread phil campaigne
Lonni J Friedman wrote: On Wed, 30 Mar 2005 15:58:02 -0500, phil campaigne [EMAIL PROTECTED] wrote: Scott Marlowe wrote: On Wed, 2005-03-30 at 14:28, phil campaigne wrote: Hi All, I want to move my development database (7.2.3) to my production server but the production server

Re: [GENERAL] Restore to a database with another name?

2005-03-30 Thread Lonni J Friedman
On Wed, 30 Mar 2005 16:24:54 -0500, phil campaigne [EMAIL PROTECTED] wrote: Lonni J Friedman wrote: On Wed, 30 Mar 2005 15:58:02 -0500, phil campaigne [EMAIL PROTECTED] wrote: Scott Marlowe wrote: On Wed, 2005-03-30 at 14:28, phil campaigne wrote: Hi All, I want to move

Re: [GENERAL] Debugging deadlocks

2005-03-30 Thread Alvaro Herrera
On Wed, Mar 30, 2005 at 02:30:58PM -0700, Michael Fuhr wrote: I think Alvaro is working on a new locking mechanism that will allow transactions to prevent a record from being modified without blocking other transactions doing the same. Yeah, and it does work. (I posted the patch two days

Re: [GENERAL] Debugging deadlocks

2005-03-30 Thread Greg Stark
Alvaro Herrera [EMAIL PROTECTED] writes: Now this can't be applied right away because it's easy to run out of memory (shared memory for the lock table). Say, a delete or update that touches 1 tuples does not work. I'm currently working on a proposal to allow the lock table to spill to

[GENERAL] database monitor

2005-03-30 Thread Edson Vilhena de Carvalho
When I say database monitor I mean a program that will keep an eye on the database showin what's appening (with transactions, users, memory, etc...) on the database helping the database administrator doing is job. My problem is to know exactly the most importante things what this program must

[GENERAL] Triggers: using table's primary key value to update another field

2005-03-30 Thread Randall Perry
I'm trying to write a generic function that will use the primary key field value to insert/update another field in the same table (see code below). What I'm having trouble with is figuring out how to grab the primary key value of the current row. I tried tacking on a var with the pkey row name to

[GENERAL] Database monitor (again)

2005-03-30 Thread Edson Vilhena de Carvalho
Sorry but perhaps it is a database monitorizer that makes the monitorization on the databases. It's my english Edson Carvalho __ Converse com seus amigos em tempo real com o Yahoo! Messenger http://br.download.yahoo.com/messenger/

Re: [GENERAL] Debugging deadlocks

2005-03-30 Thread Vivek Khera
On Mar 30, 2005, at 4:47 PM, Alvaro Herrera wrote: Now this can't be applied right away because it's easy to run out of memory (shared memory for the lock table). Say, a delete or update that touches 1 tuples does not work. I'm currently working on a proposal to allow the lock table to spill

Re: [GENERAL] Empty date

2005-03-30 Thread Yudie Pg
In my client be empty value for date fields ('. . ') , and I would like to use NULL values and empty values also. What is your reason to put empty value ('') as alternative of null value? ---(end of broadcast)--- TIP 7: don't forget to

[GENERAL] autopackage and Postgresql?

2005-03-30 Thread Tony Caduto
Does anyone know if there is a autopackage for Postgresql? http://www.osnews.com/story.php?news_id=10155 for a article www.autopackage.org for home page I tried and it works really well, and it installed a binary version of inkscape on my Gentoo box without issue. T

Fw: [GENERAL] Empty date

2005-03-30 Thread Szmutku Zoltán
Hi , Thanks :-(( My english knowledge is big handicap for exact explanation.., but For example : I have a table, that store a production progression . All progression schema is predefined respectively for all different product . Example: Record Step Name

Re: [GENERAL] plperl doesn't release memory

2005-03-30 Thread GIROIRE Nicolas (COFRAMI)
Title: RE: [GENERAL] plperl doesn't release memory Hi, I work with William. In fact, we have already done the procedure in pl/pgsql but it is too slow and we use array which are native in perl. The procedure is recursive, and use request on postgreSQL. According to the evolution of memory

Re: [GENERAL] Days in month query

2005-03-30 Thread Jeffrey Melloy
Or select date_part('day', date_trunc('month', '01/10/04') + '1 month'::interval - '1 day'::interval) as days; or select date_part('day', to_date('mon', 'Jan') + '1 month'::interval - '1 day'::interval) as days; Arthur Hoogervorst wrote: Hi, Something like this? SELECT date_part('day',

Re: [GENERAL] Catch of ERROR in PLPGSQL

2005-03-30 Thread Richard Huxton
Shaun Clements wrote: Thanks for your response. I unfortunately have to use 7.3. Will try the Exception wrap. It does appear in the manual. No it doesn't. Version 7.3 doesn't have any programmatic exception handling. Perhaps you are reading the wrong version of the manuals? -- Richard Huxton

Re: [GENERAL] Upgrade data

2005-03-30 Thread Doug McNaught
josue [EMAIL PROTECTED] writes: I did a pg_dumpall and this sentence to restore it back ./psql template1 -U postgres -p 9981 /home2/tmp/dbtest.tar You need to use 'pg_restore' for tar format dumps. -Doug ---(end of broadcast)--- TIP 3: if

[GENERAL] Days in month query

2005-03-30 Thread Mark Fox
Greetings, This is more of an SQL question, but since each database server seems to use it's own syntax for handling dates... Is there a way to query for the days in a month? For example, querying for the days in January of this year? Listing the days between two dates would be useful as well.

Re: [GENERAL] Days in month query

2005-03-30 Thread Dann Corbit
The online documentation has a search function. It would lead you to this: http://www.postgresql.org/docs/8.0/static/functions-datetime.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Fox Sent: Wednesday, March 30, 2005 3:07 PM To:

Re: [GENERAL] Debugging deadlocks

2005-03-30 Thread Alvaro Herrera
On Wed, Mar 30, 2005 at 05:41:04PM -0500, Greg Stark wrote: Alvaro Herrera [EMAIL PROTECTED] writes: Now this can't be applied right away because it's easy to run out of memory (shared memory for the lock table). Say, a delete or update that touches 1 tuples does not work. I'm

[GENERAL] Database monitoring

2005-03-30 Thread Edson Vilhena de Carvalho
I´m a estudante and I am making a project where I am developing a database monitor, PostgreSQL is one of the database's that my aplication will monotorize. I have only started working with postgreSQL recently. I would like to know what do you think it is importante and useful to be monitorized

Re: [GENERAL] Days in month query

2005-03-30 Thread Mark Fox
Greetings, Thanks Dan, but I searched for, and scoured, that page before asking my question. It helped with some of the details, but not on the general approach. I'll try to restate my problem in a better way: What I want is SELECT statement that references no tables but returns the days in a

Re: [GENERAL] Ayuda con procesamiento en Postgres !!!!

2005-03-30 Thread Francisco Reyes
On Wed, 30 Mar 2005, Carlos Roberto Chamorro Mostac wrote: Hola a todos Replied to the user offlist.. Isn't there a spanish list? ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] Days in month query

2005-03-30 Thread Dann Corbit
How about create type with create function? Make an array type to hold the 12 different month day counts. Give the function year and month as input. Use this to figure out if it is a leap year: (year % 4 == 0 (year % 100 != 0 || year % 400 == 0)) If it is a leap year, then add 1 to days if

Re: [GENERAL] Days in month query

2005-03-30 Thread Arthur Hoogervorst
Hi, Something like this? SELECT date_part('day', (date_part('year', '01/10/04' :: date) || '-' || date_part('month', '01/10/04' :: date) || '-01') ::date + '1 month'::interval - '1 day'::interval) AS days; Regards, Arthur On Wed, 30 Mar

Re: [GENERAL] Days in month query

2005-03-30 Thread Mike Nolan
What I want is SELECT statement that references no tables but returns the days in a given month. I'm now thinking that I might be able to come up with something using an IN clause and using EXTRACT, but haven't figured it out yet. I have a 'last_day' function (duplicating what the

Re: [GENERAL] Ayuda con procesamiento en Postgres !!!!

2005-03-30 Thread Alvaro Herrera
On Wed, Mar 30, 2005 at 07:14:22PM -0500, Francisco Reyes wrote: On Wed, 30 Mar 2005, Carlos Roberto Chamorro Mostac wrote: Hola a todos Replied to the user offlist.. Isn't there a spanish list? Yeah, there is: pgsql-es-ayuda on the same server. -- Alvaro Herrera ([EMAIL PROTECTED]) A

Re: [GENERAL] Database monitoring

2005-03-30 Thread Dann Corbit
When you say a database monitor, do you mean a transaction monitor or something else? This might be related: http://sourceforge.net/projects/starccm/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Edson Vilhena de Carvalho Sent: Wednesday, March 30,