Received: from netcom.com (zalman@netcom8.netcom.com [199.183.9.108]) by hub.org (8.9.3/8.9.3) with ESMTP id BAA94892 for ; Fri, 5 Nov 1999 01:48:09 -0500 (EST) (envelope-from zalman@netcom.com) Received: (from zalman@localhost) by netcom.com (8.9.3/8.9.3) id WAA06502; Thu, 4 Nov 1999 22:48:05 -0800 (PST) From: Zalman Stern Message-Id: <199911050648.WAA06502@netcom.com> Subject: Re: [SQL] Tracking depth question To: zot@zotconsulting.com (Zot O'Connor) Date: Thu, 4 Nov 1999 22:48:05 -0800 (PST) Cc: pgsql-sql@hub.org In-Reply-To: <3821C4EF.CE5484E@zotconsulting.com> from "Zot O'Connor" at Nov 4, 99 09:39:59 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > scatdepth integer DEFAULT (SELECT scatval from scattab where scatval = > scatscat) + 1, I think you mean "(SELECT scatdepth from scattab where scatval = scatscat) + 1" . (Perhaps you might consider calling scatscat "scatparent" instead.) How about defining a function and setting the default to its return value? -Z-