Re: Primary key reference count

From: Wiebe Cazemier <halfgaar(at)gmx(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Primary key reference count
Date: 2006-04-19 13:33:18
Message-ID: e25e6v$om6$1@sea.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wednesday 19 April 2006 15:09, A. Kretschmer wrote:

> Yes,
> http://www.postgresql.org/docs/8.1/interactive/catalog-pg-constraint.html

Either I'm blind, or this is not what I'm looking for. I need to know the
amount of references _to_ a primary key. If you have a customer with two
orders and one invoice, the reference count for the primary key of the
custormer would be 3.

I need to know if I can delete rows which are not referenced anywhere, without
catching the relational constraint exception. The reason I can't catch the
exception, is that I want the exception to arrive at my application and/or
tests.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Wiebe Cazemier 2006-04-19 15:00:19 Re: Primary key reference count
Previous Message A. Kretschmer 2006-04-19 13:09:32 Re: Primary key reference count