Skip site navigation (1) Skip section navigation (2)

Re: Inheritance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hasnul Fadhly bin Hasan <hasnulfadhly(dot)h(at)mimos(dot)my>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Inheritance
Date: 2004-12-21 03:45:26
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Hasnul Fadhly bin Hasan <hasnulfadhly(dot)h(at)mimos(dot)my> writes:
> I'm just wondering, what real benefit does inheritance have?  When i 
> create two tables, one inherited from the other,
> does that mean i have two tables with same duplicate data or actually 
> they are joined in the back end?

It's more like an implicit UNION ALL.  There's no duplication, but when
you specify a SELECT/UPDATE/DELETE over the parent table, the child
table is implicitly processed as well.

			regards, tom lane

In response to

  • Inheritance at 2004-12-21 03:21:55 from Hasnul Fadhly bin Hasan


pgsql-novice by date

Next:From: Keith WorthingtonDate: 2004-12-21 03:48:43
Subject: Re: CAST and timestamp
Previous:From: Hasnul Fadhly bin HasanDate: 2004-12-21 03:21:55
Subject: Inheritance

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group