pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: joerg.troester@gmx.net
To: pgsql-sql@postgresql.org
Subject: Inheritance and origin of rows
Date: Mon, 7 Dec 1998 15:36:42 +0100 (MET)
Message-ID: <7604.913041402@www.gmx.net> (raw)

In my database I created a table "partners" and two tables "individuals"
and "companies" which are inherited from "partners". Table "partners" has
columns "name", "address", "phone",... 

Now I want to query any partner being an individual or company by a
statement like "select name,address,phone from partners*". For further proceeding
the information is needed which table (individuals or companies) any row is
taken from.

My question is: 
* is there any possibility to retrieve this information from a system
table (e.g. the name of the table where a row/rowid resides in) 
* or do I need a workaround like adding a column "tablename" into table
"partners"?

Thanks a lot for answering.
---
Sent through Global Message Exchange - http://www.gmx.net



Message-ID: <7604.913041402@www.gmx.net>
Permalink:  ../7604.913041402@www.gmx.net/
Also on:    postgresql.org/message-id/7604.913041402@www.gmx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: joerg.troester@gmx.net
  Subject: Re: Inheritance and origin of rows
  In-Reply-To: <7604.913041402@www.gmx.net>
  References: <7604.913041402@www.gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox