Fwd: Re: [GENERAL] problem connecting to server

2006-06-19 Thread Trigve Siver
Note: forwarded message attached. Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.--- Begin Message --- Hi, Thank you for reply. No there isn't any panic message. Log contain only messages I have posted.   TrigveQingqing Zhou <[EMAIL PROTECTED]> wrote: "Trigve Siver

Re: [GENERAL] Database Clustering on multiple harddisk

2006-06-19 Thread arie nugraha
Thanks a Alex, But can tou give a bit explanation about multiple separate tablespace and HBA, or is there any resources, tutorial on how to use this features on postgresql Thanks a lot Alex Turner wrote: I think you may be a little confused... Last time I checked, Oracle RAC doesn't actua

[GENERAL] join on next row

2006-06-19 Thread Sim Zacks
I am having brain freeze right now and was hoping someone could help me with a (fairly) simple query. I need to join on the next row in a similar table with specific criteria. I have a table with events per employee. I need to have a query that gives per employee each event and the event after

Re: [GENERAL] Computing transitive closure of a table

2006-06-19 Thread Chris Smith
Thanks for everyone's suggestions. I found the following, which at least seems to meet my needs temporarily. http://citeseer.ist.psu.edu/dong99maintaining.html Should it turn out that this is not feasible to implement via triggers in PostgreSQL, I may be back with more questions and seek o

Re: [GENERAL] Adding foreign key constraints without integrity check?

2006-06-19 Thread louis gonzales
Florian, So if you: create table test ( id varchar(2) primary key, age int ); create table test2 ( id varchar(2) primary key, age2 int ); alter table test2 add foreign key (id) references test (id); \d test2 you'll see that attribute "id" from test2, now has both a primary key constraint an

Re: [GENERAL] Database Clustering on multiple harddisk

2006-06-19 Thread Alex Turner
I think you may be a little confused...Last time I checked, Oracle RAC doesn't actualy support clustering the I/O, it's one Database backend with multiple instances on the front-end, which is only clustering the CPU bound part (it's also VERY expensive). If by clustering you mean multiple seperate

Re: [GENERAL] Adding foreign key constraints without integrity check?

2006-06-19 Thread louis gonzales
Florian, I understand where you're coming from. Indexes are always unique and all RDBMS systems use them to 'uniquely' identify a row from the the perspective of internal software management. Index != PrimaryKey, so every table created, despite any Primary/Foreign key contraints put on them,

[GENERAL] Database Clustering on multiple harddisk

2006-06-19 Thread Arie Nugraha
Hi list,I am new postgresql user and i had read the documentation buti dont if PostgreSQL support database clustering on multiple harddisk (multiple I/O, just like DB2 and Oracle does) or not.If postgreSQL support the database clustering is there any documentation or tutorial that explain how to do

Re: [GENERAL] ERROR: there is no parameter $1

2006-06-19 Thread Tom Lane
Kevin Jenkins <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Hm, nothing obviously wrong there. What PG version is this exactly? >> Can you supply a self-contained test case? > I made the smallest test case that I can and uploaded it here: > http://www.rakkarsoft.com/PostgreBug.zip > I'm sorry

Re: [GENERAL] incremental backup?

2006-06-19 Thread Bill Moran
"shyju c.k" <[EMAIL PROTECTED]> wrote: > hai all > > have to daily back up only the just update or inserted data > only , how it possible In postgresql? http://www.postgresql.org/docs/8.1/static/backup-online.html -- Bill Moran I already know the ending it's the part that makes

[GENERAL] incremental backup?

2006-06-19 Thread shyju c.k
hai all   plz give the right answer       have to daily back up only the just update or inserted data only , how it possible In postgresql?    now am doing incremental backup of the  file system (/var/lib/pgsql/data)   regards SHYJU C.K

Re: [GENERAL] ERROR: there is no parameter $1

2006-06-19 Thread Kevin Jenkins
Tom Lane wrote: Kevin Jenkins <[EMAIL PROTECTED]> writes: I get ERROR: there is no parameter $1. INSERT INTO FileVersionHistory(applicationID, filename, createFile, changeSetID, userName) VALUES (1,$1::text,FALSE,9,'postgres'); outTemp[0]=deletedFiles.fileList[fileListIndex].filename; out

Re: [GENERAL] psql for winxp?

2006-06-19 Thread Jerry LeVan
Hi John, Is it possible to have the installer only emplace psql and the necessary support libs? Jerry On Jun 19, 2006, at 8:36 PM, John DeSoi wrote: Hi Jerry, You can use psql directly and communicate with it using a pipe stream. On Windows I believe this is equivalent to calling CreateP

Re: [GENERAL] problem connecting to server

2006-06-19 Thread Qingqing Zhou
"Trigve Siver" <[EMAIL PROTECTED]> wrote > > I have installed PostgreSQL 8.1 on windows XP with SP2 ... > > 2006-06-19 12:00:38 LOG: terminating any other active server processes > 2006-06-19 12:00:38 LOG: all server processes terminated; reinitializing > 2006-06-19 12:00:41 LOG: background

Re: [GENERAL] Adding foreign key constraints without integrity

2006-06-19 Thread Wes
BTW, I do appreciate any and all suggestions. I hope my last message didn't come across otherwise. That's not what was intended. It's just that adding/replacing hardware is not an option right now. Maybe next year... I'm still trying to dig up another 2GB memory. The database actually perform

Re: [GENERAL] simple query terminated by signal 11

2006-06-19 Thread Qingqing Zhou
""Thomas Chille"" <[EMAIL PROTECTED]> wrote > Hi List, > > i run in to an error while dumping a db. > > after investigating it, i found a possible corrupted table. but i am not sure. > and i dont know how i can repair it? could it be a harddrive error? > > > # now the error: SELECT * FROM hst_sale

Re: [GENERAL] psql for winxp?

2006-06-19 Thread John DeSoi
Hi Jerry, You can use psql directly and communicate with it using a pipe stream. On Windows I believe this is equivalent to calling CreateProcess and CreatePipe which results in a bidirectional stream. This is how pgEdit makes use of psql for the editor. I'm not familiar with Tcl or Pytho

Re: [GENERAL] Adding foreign key constraints without integrity

2006-06-19 Thread Wes
On 6/19/06 4:48 PM, "Scott Marlowe" <[EMAIL PROTECTED]> wrote: > > I think Jim was thinking of RAID 1+0. If you gotta use RAID 5, at least > have a contoller with several hundred megs of battery backed cache. > Better yet, use a RAID controller with a gig or so of BBU cache and run > RAID 1+0 on

Re: [GENERAL] Cannot restart postgres

2006-06-19 Thread Tom Lane
elein <[EMAIL PROTECTED]> writes: > 7.x installation. (Yeah, yeah, upgrade.) > I have a disk which has only the database on it. > It has become full and postgres won't start. > Is there an option (besides restore from backup) > other than trying to move the data dir to a bigger > disk? I'd tr

Re: [GENERAL] Cannot restart postgres

2006-06-19 Thread Scott Marlowe
On Mon, 2006-06-19 at 17:45, Casey Duncan wrote: > Are there any other partitions on that machine with space available? > If so you could move some files there from your postgres data dir and > symlink to them from their original location. At least then you might > get it to start so you can

Re: [GENERAL] Cannot restart postgres

2006-06-19 Thread Casey Duncan
Are there any other partitions on that machine with space available? If so you could move some files there from your postgres data dir and symlink to them from their original location. At least then you might get it to start so you can get a pg_dump to work. -Casey On Jun 19, 2006, at 1:43

Re: [GENERAL] Adding foreign key constraints without integrity check?

2006-06-19 Thread Florian G. Pflug
louis gonzales wrote: Florian, Are you certain: "You can only create an FK if the fields you are referencing in the foreign table form a PK there. And creating a PK implicitly creates an index, which you can't drop without dropping the PK :-(" Arg.. Should have written "unique index" instea

[GENERAL] psql for winxp?

2006-06-19 Thread Jerry LeVan
Hi, I would like to install a "psql" command line program on my winxp box. ( something that acts like psql on a unix box.) I hope to embed such a program in my Tcl/Tk and Python PostgreSQL browsers so I can more offer more functionality in the browsers... My development environment on XP is res

Re: [GENERAL] Computing transitive closure of a table

2006-06-19 Thread Bricklen Anderson
There was a thread last November entitled "Transitive closure of a directed graph" on the [HACKERS] list. There may be some information of use there. ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to

Re: [GENERAL] Adding foreign key constraints without integrity

2006-06-19 Thread Scott Marlowe
On Mon, 2006-06-19 at 16:39, Wes wrote: > On 6/19/06 3:47 PM, "Jim Nasby" <[EMAIL PROTECTED]> wrote: > > > FWIW, RAID5 isn't normally a good recipe for good database performance. > > Understood, but RAID 1 isn't always feasible. The database performs very > well with the current hardware configu

Re: [GENERAL] Computing transitive closure of a table

2006-06-19 Thread Chris Smith
Oleg Bartunov wrote: Chris, have you seen contrib/ltree ? I hadn't. Thanks! I will look into it further, but I'm currently a bit concerned by the word "tree" in the title. Many of the problems I'm solving are not trees, though nearly all are DAGs. -- Chris Smith - Lead Software Develope

Re: [GENERAL] Adding foreign key constraints without integrity

2006-06-19 Thread Wes
On 6/19/06 3:47 PM, "Jim Nasby" <[EMAIL PROTECTED]> wrote: > FWIW, RAID5 isn't normally a good recipe for good database performance. Understood, but RAID 1 isn't always feasible. The database performs very well with the current hardware configuration - I have no complaints. The only time we hav

Re: [GENERAL] Adding foreign key constraints without integrity

2006-06-19 Thread Wes
On 6/19/06 3:24 PM, "Scott Marlowe" <[EMAIL PROTECTED]> wrote: > Are you sure that's really the problem? Do you have indexes on the > referring tables (i.e. the foreign key that points to the other table's > primary key). Not having an index on the subordinate table makes each > and every check

Re: [GENERAL] How to build with bigger WAL segment file?

2006-06-19 Thread Clodoaldo Pinto
2006/6/19, Clodoaldo Pinto <[EMAIL PROTECTED]>: Since I have a database with a frequent and huge update batch, the WAL segment file number is about 130. I suspect these files management during the update is hurting performance. Is it likely? I'm using Fedora Core 3 and checkpoint_segments is set

Re: [GENERAL] Adding foreign key constraints without integrity

2006-06-19 Thread Jim Nasby
On Jun 18, 2006, at 11:08 PM, Wes wrote: System memory is 2GB (would like more, but...). Data is on one array (hardware RAID 5 of eight 73 GB 10k SCSI drives), indexes on another (hardware RAID 5 of five 15K 146 GB SCSI drives on a separate channel), and pg_xlog on a third RAID 1 on a third ch

Re: [GENERAL] A slow query - Help please?

2006-06-19 Thread Jim Nasby
On Jun 19, 2006, at 7:00 AM, Alban Hertroys wrote: Now all we need to do is getting MMBase to do its queries like this :P Probably a better bet would be going to 8.1 and using constraint elimination. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software h

Re: [GENERAL] MySQL insert() and instr() equiv

2006-06-19 Thread Jim Nasby
On Jun 17, 2006, at 1:18 PM, Mark Constable wrote: On Sunday 18 June 2006 02:33, Tom Lane wrote: uid is an email address stored in the passwd table as [EMAIL PROTECTED] and this construct allows an incoming username such as "user.domain.com" to be compared to the stored "[EMAIL PROTECTED]".

[GENERAL] Cannot restart postgres

2006-06-19 Thread elein
7.x installation. (Yeah, yeah, upgrade.) I have a disk which has only the database on it. It has become full and postgres won't start. Is there an option (besides restore from backup) other than trying to move the data dir to a bigger disk? Would pg_resetxlog do the right thing to free up so

Re: [GENERAL] Adding foreign key constraints without integrity

2006-06-19 Thread Scott Marlowe
On Sun, 2006-06-18 at 22:41, Wes wrote: > Is there a way to add a foreign key constraint without having to wait for it > to check the consistency of all existing records? If a database is being > reloaded (pg_dumpall then load), it really shouldn't be necessary to check > the referential integrity

Re: [GENERAL] Computing transitive closure of a table

2006-06-19 Thread Bruno Wolff III
On Mon, Jun 19, 2006 at 13:43:17 -0600, Chris Smith <[EMAIL PROTECTED]> wrote: > I am doing some preliminary work on the next major release of a piece of > software that uses PostgreSQL. As odd as this sounds, it seems that a huge > percentage of the new features that have been requested invol

Re: [GENERAL] Computing transitive closure of a table

2006-06-19 Thread Oleg Bartunov
Chris, have you seen contrib/ltree ? Oleg On Mon, 19 Jun 2006, Chris Smith wrote: I am doing some preliminary work on the next major release of a piece of software that uses PostgreSQL. As odd as this sounds, it seems that a huge percentage of the new features that have been requested involv

[GENERAL] Computing transitive closure of a table

2006-06-19 Thread Chris Smith
I am doing some preliminary work on the next major release of a piece of software that uses PostgreSQL. As odd as this sounds, it seems that a huge percentage of the new features that have been requested involve computing the transitive closure of a binary relation that's expressed in a databas

Re: [GENERAL] Adding foreign key constraints without integrity check?

2006-06-19 Thread louis gonzales
Florian, Are you certain: "You can only create an FK if the fields you are referencing in the foreign table form a PK there. And creating a PK implicitly creates an index, which you can't drop without dropping the PK :-(" I'm not sure I am convinced the necessity of a foreign key, "need

Re: [GENERAL] ERROR: there is no parameter $1

2006-06-19 Thread Tom Lane
Kevin Jenkins <[EMAIL PROTECTED]> writes: > I get ERROR: there is no parameter $1. > INSERT INTO FileVersionHistory(applicationID, filename, createFile, > changeSetID, userName) VALUES (1,$1::text,FALSE,9,'postgres'); > outTemp[0]=deletedFiles.fileList[fileListIndex].filename; > outLengths[0]=s

[GENERAL] simple query terminated by signal 11

2006-06-19 Thread Thomas Chille
Hi List, i run in to an error while dumping a db. after investigating it, i found a possible corrupted table. but i am not sure. and i dont know how i can repair it? could it be a harddrive error? Here are the logs: # all fine: SELECT * FROM hst_sales_report WHERE id = 5078866 [6208 / 2006-06

[GENERAL] ERROR: there is no parameter $1

2006-06-19 Thread Kevin Jenkins
Hi, I'm using PQexecParams so I can upload filenames including path that have '\' characters. It works everywhere else I used it but not with this query. I get ERROR: there is no parameter $1. INSERT INTO FileVersionHistory(applicationID, filename, createFile, changeSetID, userName) VALUE

Re: [GENERAL] Adding foreign key constraints without integrity check?

2006-06-19 Thread Florian G. Pflug
Wes wrote: You could create the fk-constraints _first_, then disable them, load the data, reindex, and reenable them afterwards. pg_dump/pg_restore can enable and disable fk-constraints before restoring the data, I believe. It does so by tweaking the system catalogs. Are referring to '--disabl

[GENERAL] Changing encoding of a database

2006-06-19 Thread Marco Bizzarri
I all. We've PostgreSQL database, with SQL_ASCII or LATIN1 encoding. We would like to migrate them to UNICODE. Is there some contributed/available script, or this is something we should do at hand? Regards Marco -- Marco Bizzarri http://notenotturne.blogspot.com/ ---(end

Re: [GENERAL] SELECT statement takes 10 minutes to answer

2006-06-19 Thread Chris Browne
"Mustafa Korkmaz" <[EMAIL PROTECTED]> writes: > Iam using PostgreSQL 7.4.5 on a linux machine, and have the problem > that an easy "SELECT field1, field2, field3 FROM a_table"-statement > takes 10 minutes to give an answer. The table has 750.000 datarows. I > also made an VACUUM a_table before the

Re: [GENERAL] Adding foreign key constraints without integrity

2006-06-19 Thread Wes
> What PG version is this, and what have you got maintenance_work_mem set to? > Undersized m_w_m would hurt both index build and FK checking ... Looking at the stats again, I did see something unexpected. With MWM set to 983025, index builds were running about 1.3 GB for both RSS and virtual. Add

Re: [GENERAL] Question about openSSL

2006-06-19 Thread Dave Page
> -Original Message- > From: Tony Caduto [mailto:[EMAIL PROTECTED] > Sent: 19 June 2006 14:27 > To: Dave Page > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Question about openSSL > > Dave Page wrote: > > > > Err, not quite correct. The app directory is *always* the > fir

Re: [GENERAL] Question about openSSL

2006-06-19 Thread Tony Caduto
Dave Page wrote: Err, not quite correct. The app directory is *always* the first choice in either safe or unsafe mode, except if using LoadLibraryEx's alternate search order. See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc /base/dynamic-link_library_search_order.asp.

[GENERAL] How to build with bigger WAL segment file?

2006-06-19 Thread Clodoaldo Pinto
Since I have a database with a frequent and huge update batch, the WAL segment file number is about 130. I suspect these files management during the update is hurting performance. Is it likely? I'm using Fedora Core 3 and checkpoint_segments is set to 64. To overcome this I'm considering to make

Re: [GENERAL] Out of memory error in 8.1.0 Win32

2006-06-19 Thread Relyea, Mike
work_mem = 262144 I'm still trying to figure out how to track the memory usage in ExecutorState -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lane Sent: Sunday, June 18, 2006 11:13 PM To: Qingqing Zhou Cc: pgsql-general@postgresql.org Subject: Re:

Re: [GENERAL] Adding foreign key constraints without integrity

2006-06-19 Thread Wes
> You could create the fk-constraints _first_, then disable them, load > the data, reindex, and reenable them afterwards. > > pg_dump/pg_restore can enable and disable fk-constraints before restoring > the data, I believe. It does so by tweaking the system catalogs. Are referring to '--disable-tr

Re: [GENERAL] A slow query - Help please?

2006-06-19 Thread Alban Hertroys
hubert depesz lubaczewski wrote: in case you can't, do something similar to this: select * from ( select * from only table_a order by number desc limit 25 union select * from only table_b order by number desc limit 25 union select * from only table_c order by number desc limit 25 ) x order by

Re: [GENERAL] A slow query - Help please?

2006-06-19 Thread Gurjeet Singh
Hubert said 'do "something similar" to this'... The syntax was incorrect for sure. If you wish to be able to do ORDER BY and LIMIT in UNION queries, you need to make them sub-queries "something similar" to this: select * from ( select * from (select * from only table_a order by number desc limi

Re: [GENERAL] Adding foreign key constraints without integrity check?

2006-06-19 Thread Florian G. Pflug
Wes wrote: Is there a way to add a foreign key constraint without having to wait for it to check the consistency of all existing records? If a database is being reloaded (pg_dumpall then load), it really shouldn't be necessary to check the referential integrity - or at least I should be able to

Re: [GENERAL] A slow query - Help please?

2006-06-19 Thread Alban Hertroys
hubert depesz lubaczewski wrote: ditch the inheritance. it is no good, and makes everything too complicated to work with. Would love to, but that's what the system we use generates (MMBase, for the record). We can probably rework the generated tables, but it isn't entirely certain that won't

[GENERAL] problem connecting to server

2006-06-19 Thread Trigve Siver
Hi   I have installed PostgreSQL 8.1 on windows XP with SP2 ... Everything is working fine, but sometimes when I want to connect to DB via pgadmin or command line or with some library, I can't connect. When this happen no error is shown but pgadmin is not responding and when connecting via comman

Re: [GENERAL] Question about openSSL

2006-06-19 Thread Magnus Hagander
> Well, then what do I need to get NpGSQL connecting to my > server with SSL? > > Do I just turn SSL on in the database and in my connection > string set SSL to true? Yes. You need to have the Mono.Security.DLL (or similar named - and this is needed on MS .Net as well!), btu that's it. It's inc

Re: [GENERAL] Question about openSSL

2006-06-19 Thread greg
Well, then what do I need to get NpGSQL connecting to my server with SSL? Do I just turn SSL on in the database and in my connection string set SSL to true? The other provider is CoreLab .NET for PostGreSQL. It seems pretty good, but don't see the point in paying for a provider when I can get o

Re: [GENERAL] Question about openSSL

2006-06-19 Thread Magnus Hagander
> You will need to copy the two dlls > (ssleay32.dll,libeay32.dll) to the same directory where you > have your npgsql.net assembly. If we're talking npgsql (http://pgfoundry.org/projects/npgsql), that information is incorrect. Npgsql uses a managed implementation of SSL, so it does *not* use the

Re: [GENERAL] Question about openSSL

2006-06-19 Thread Dave Page
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Tony Caduto > Sent: 19 June 2006 03:51 > To: Greg Quinn; pgsql-general@postgresql.org > Subject: Re: [GENERAL] Question about openSSL > > Greg Quinn wrote: > > 1.) I went to the OpenSSL ste, and