Re: [GENERAL] Foreign keys question (performance)

2011-12-06 Thread Adrian Klaver
On 12/06/2011 08:45 AM, Phoenix Kiula wrote: On Sun, Dec 4, 2011 at 7:41 PM, Phoenix Kiula wrote: On Sun, Dec 4, 2011 at 7:14 PM, Alban Hertroys wrote: On 4 Dec 2011, at 11:19, Phoenix Kiula wrote: I have a problem. Here's my table designs. The problem is that if Table 1 (stores) has a fo

Re: [GENERAL] Foreign keys question (performance)

2011-12-06 Thread David Johnston
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Phoenix Kiula Sent: Tuesday, December 06, 2011 11:46 AM To: Alban Hertroys Cc: PG-General Mailing List Subject: Re: [GENERAL] Foreign keys question (performance) On Sun

Re: [GENERAL] Foreign keys question (performance)

2011-12-06 Thread Phoenix Kiula
On Sun, Dec 4, 2011 at 7:41 PM, Phoenix Kiula wrote: > On Sun, Dec 4, 2011 at 7:14 PM, Alban Hertroys wrote: >> On 4 Dec 2011, at 11:19, Phoenix Kiula wrote: > > >> >> INSERTs in the parent table don't need to check for any reference from the >> child table, since they're new; there can't b

Re: [GENERAL] Foreign keys question (performance)

2011-12-04 Thread Phoenix Kiula
On Sun, Dec 4, 2011 at 7:14 PM, Alban Hertroys wrote: > On 4 Dec 2011, at 11:19, Phoenix Kiula wrote: > > INSERTs in the parent table don't need to check for any reference from the > child table, since they're new; there can't be a reference. UPDATEs and > DELETEs do though, whether you le

Re: [GENERAL] Foreign keys question (performance)

2011-12-04 Thread Alban Hertroys
On 4 Dec 2011, at 11:19, Phoenix Kiula wrote: > Hi. > > I have a foreign key as such: > > > ALTER TABLE child_table > ADD CONSTRAINT fk_child > FOREIGN KEY (stringid) REFERENCES parent_table (stringid) MATCH FULL > ON DELETE CASCADE ; > > > Questions: > > 1. Is "MATCH FULL" adding any value

[GENERAL] Foreign keys question (performance)

2011-12-04 Thread Phoenix Kiula
Hi. I have a foreign key as such: ALTER TABLE child_table ADD CONSTRAINT fk_child FOREIGN KEY (stringid) REFERENCES parent_table (stringid) MATCH FULL ON DELETE CASCADE ; Questions: 1. Is "MATCH FULL" adding any value here? If the foreign key is just on an "id" column, what purpose does it se

Re: [GENERAL] Foreign Keys Question

2005-04-13 Thread Oleg Bartunov
Will inherits helps you ? create table SITE_forum.t1 () inherits (SITE.t); Oleg On Wed, 13 Apr 2005, Matthias Loitsch wrote: First of all, hi. I'm new to this mailing list. I searched this on the net, but I didn't get any usable answers... So here's my problem: I have 2 schemas. One is called SITE,

Re: [GENERAL] Foreign Keys Question

2005-04-13 Thread Bruno Wolff III
On Wed, Apr 13, 2005 at 13:54:05 +0200, Matthias Loitsch <[EMAIL PROTECTED]> wrote: > > So I thought I could make a foreign key on a different Schema (db), and > use the same table > > And well, thats where I started to search if this is possible ... and, > in fact my main question is: Is t

[GENERAL] Foreign Keys Question

2005-04-13 Thread Matthias Loitsch
First of all, hi. I'm new to this mailing list. I searched this on the net, but I didn't get any usable answers... So here's my problem: I have 2 schemas. One is called SITE, one SITE_forum. What I wanted, is to separate the forum from the whole Site db, so I can put them on different server