Re: self referencing table.

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: David Salisbury <salisbury(at)globe(dot)gov>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: self referencing table.
Date: 2012-01-20 23:50:15
Message-ID: 4F19FDB7.7000003@ringerc.id.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 19/01/2012 12:57 AM, David Salisbury wrote:
> Think I'll answer myself on this. I'll join in whatever rows I get from
> the self referential query above to the base table, and include the
> rank column,
> and then figure out some sort of post processing on the resultant view
> ( I hope ).
>
Usually recursive common table expressions (`WITH RECURSIVE') are used
to handle queries on self-referential tables. Have a look in the
documentation for more information.

--
Craig Ringer

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Brar Piening 2012-01-20 23:56:58 Re: "could not accept SSPI security context"
Previous Message Ralph Graulich 2012-01-20 23:22:13 Re: comments in argument list of plpgsql get stripped?