Re: [SQL] Tracking depth question - Mailing list pgsql-sql

From Zalman Stern
Subject Re: [SQL] Tracking depth question
Date
Msg-id 199911050648.WAA06502@netcom.com
Whole thread Raw
In response to Tracking depth question  ("Zot O'Connor" <zot@zotconsulting.com>)
List pgsql-sql
> 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-


pgsql-sql by date:

Previous
From: De Moudt Walter
Date:
Subject: Re: [SQL] Redhat 6.0 Link Error: Undefined Reference to crypt
Next
From: Stoyan Genov
Date:
Subject: Re: [SQL] Accessing other database...