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
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
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
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
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,
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
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:
-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
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
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
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
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
12 matches
Mail list logo