[GENERAL] concurent updates

2001-07-26 Thread Steve SAUTETNER
hi everybody ! I've got a little problem when updating a primary key in two table where the primary key of the one is a foreign key from the second : here are the 2 tables : create table table1 (id int primary key, col1 int); create table table2 (id int primary key references table1(id), col2

[GENERAL] memory problems with freebsd

2001-07-26 Thread matthieuclavier
Hi, we work with PostgreSQL 7.0.3 and FreeBSD (4.2 / 4.3). the database is in production state, and daily heavy loaded. i think our problems are similar to problems described in : http://fts.postgresql.org/db/mw/msg.html?mid=28871 recently, we have updated our kernel, according to this doc

Re: [GENERAL] concurent updates

2001-07-26 Thread Andre Schnabel
Hi, if you define the foreign key with ON UPDATE CASCADE you don't have to worry about updating table2. Would look like this: the tables: create table table1 (id int primary key, col1 int); create table table2 (id int primary key references table1(id) ON UPDATE CASCADE, col2 int); the (one and

Re: [GENERAL] concurent updates

2001-07-26 Thread Stephan Szabo
On Thu, 26 Jul 2001, Steve SAUTETNER wrote: hi everybody ! I've got a little problem when updating a primary key in two table where the primary key of the one is a foreign key from the second : here are the 2 tables : create table table1 (id int primary key, col1 int); create table

Re: [GENERAL] concurent updates

2001-07-26 Thread wsheldah
Why do you need to change the value of the id field?? The id field shouldn't have any meaning attached to it beyond the fact that it uniquely identifies a row in the table, and of course its usage as a foreign key when it serves that role. If you just want to change what numbers get assigned,

Re: [GENERAL] concurent updates

2001-07-26 Thread Len Morgan
Unless you have over simplified your example, why do you have two tables? Wouldn't: create table table1 (id int primary key, col1 int, col2 int) do the same thing in one table? I would think that ANY schema that has two tables with the SAME primary key can be resolved to one table without

[GENERAL] getInherits(): SELECT failed.

2001-07-26 Thread Nigel Gilbert
I have inherited a database apparently set up using postgres7.0.2. I now want to dump the database in preparation for tidying up and upgrading to the current version of postgresql. However, pg_dumpall gives: pg_dumpall db.out getInherits(): SELECT failed. Explanation from backend: 'ERROR:

[GENERAL] RE: ODBC PG error

2001-07-26 Thread Hiroshi Inoue
-Original Message-From: Kenneth R. Martinek [mailto:[EMAIL PROTECTED]] Yes, here's the ODBC trace: [snip]PHON_SCH fff47369-fffad825 ENTER SQLTablePrivilegesW HSTMT 016D2CE4 WCHAR * 0x SWORD 0 WCHAR * 0x SWORD 0

[GENERAL] Re: diff's between creations of tables

2001-07-26 Thread Joel Burton
On Thu, 26 Jul 2001, G.L. Grobe wrote: When creating an incremental and unique id, what are the benefits of using: CREATE TABLE tablename (colname SERIAL); instead of : CREATE SEQUENCE tablename_colname_seq; CREATE TABLE tablename (colname integer DEFAULT

[GENERAL] Re: Good random numbers in PG? And crypto-wishlist

2001-07-26 Thread Bruno Wolff III
On Thu, Jul 26, 2001 at 05:02:30AM -, Dr. Evil [EMAIL PROTECTED] wrote: I'm writing an application that requires cryptographicly-sound random decimal digits in PG. One way to do this is with a plain old hash like SHA1. The problem is that this produces a 20 byte string, when what I

Re: [GENERAL] Hardware Recommendations

2001-07-26 Thread Justin Clift
Hi all, One of my personal rules is that whenever someone says they're going to get a 10K RPM SCSI drive, I always tell them to go 2 x 10K RPM SCSI drives (half the size each) and do RAID 0. Or, preferably go 3 x and do RAID 5. My point is that 10K RPM drives are nice, but more is better (and

Re: [GENERAL] Re: Running Postmaster - PGDATA Variable

2001-07-26 Thread Martijn van Oosterhout
On Fri, Jul 27, 2001 at 12:28:25AM +, Lee Harr wrote: Lock file /usr/local/pgsql/data/postmaster.pid already exists. If you are absolutely sure that there is not another postmaster still running you can remove the postmaster.pid file The file may have been left there if you killed