Re: Using complex PRIMARY KEY

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Using complex PRIMARY KEY
Date: 2009-10-07 20:34:18
Message-ID: 20091007203417.GB5407@samason.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Oct 07, 2009 at 09:19:58PM +0200, Zsolt wrote:
> For a given house I would like to start the numbering of tenants from
> 1. Each house could have tenant_ID=1, obviously in this case the
> house_ID will differ. The combination of tenant_ID and house_ID will
> be the unique identifier of each tenant.

The term for this that tends to float around for this concept (in PG
anyway) is "gap-less sequences": this looks like a reasonable link:

http://www.varlena.com/GeneralBits/130.php

--
Sam http://samason.me.uk/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kynn Jones 2009-10-07 20:59:01 Re: How to troubleshoot authentication failure?
Previous Message Zsolt 2009-10-07 19:19:58 Using complex PRIMARY KEY