pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jonathan Knopp <pgsql@delegated.net>
To: pgsql-sql@postgresql.org
Subject: Re: Way to stop recursion?
Date: Fri, 26 Nov 2004 13:53:06 -0800
Message-ID: <41A7A5C2.6080800@delegated.net> (raw)
In-Reply-To: <19345.1101504671@sss.pgh.pa.us>
References: <41A79A2A.6070606@delegated.net>
	<19345.1101504671@sss.pgh.pa.us>

Tom Lane wrote:
>>CREATE TABLE parent (id INT, cola CHAR(1), common CHAR(1));
>>CREATE TABLE child (id INT, parent_id INT, cola(1), common(1));
> 
>>What I need, is when "common" is changed for a parent, then that new 
>>value is reflected in "common" for all the children, ie:
>>...
>>Problem is, when "common" is changed for a child, I need the parent and 
>>all siblings to reflect that value too, ie:
> 
> Seems to me that your real problem is a bogus database layout.  If there
> should only be one "common" value for a parent and children, then only
> store one value ... that is, "common" should exist only in the parent.
> ...

Sorry, I should have mentioned that there is a lot more to the design 
that makes this replication necessary, including another two levels to 
the tree plus the ability to have orphaned children.



view thread (8+ messages)  latest in thread

Message-ID: <41A7A5C2.6080800@delegated.net>
Permalink:  ../41A7A5C2.6080800@delegated.net/
Also on:    postgresql.org/message-id/41A7A5C2.6080800@delegated.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pgsql@delegated.net
  Subject: Re: Way to stop recursion?
  In-Reply-To: <41A7A5C2.6080800@delegated.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox