Re: inherited tables

From: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
To: Verena Ruff <lists(at)triosolutions(dot)at>, <pgsql-novice(at)postgresql(dot)org>
Subject: Re: inherited tables
Date: 2006-07-10 11:01:25
Message-ID: C0D7ABC5.D9BD%sdavis2@mail.nih.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On 7/9/06 9:40 AM, "Verena Ruff" <lists(at)triosolutions(dot)at> wrote:

>
> Hello,
>
> I have some inherited tables, which all share the same primary key, like
>
> table1 with PK id
> table2 inherits table1 with PK id
> table3 inherits table1 with PK id
>
> where id is a serial.
>
> If I have an id, is there an easy way to find out in which of these
> tables this record is created (was it INSERT INTO table1 or INSERT INTO
> table2 or INSERT INTO table3)?

There is an example in the docs:

http://www.postgresql.org/docs/8.1/interactive/ddl-inherit.html

Sean

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Andrej Ricnik-Bay 2006-07-10 18:19:59 Re: Help!
Previous Message Verena Ruff 2006-07-09 13:40:46 inherited tables