X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 163BFD1B53C for ; Wed, 1 Oct 2003 09:53:07 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 94525-02 for ; Wed, 1 Oct 2003 06:52:20 -0300 (ADT) Received: from host5.ccw.gov.uk (host5.ccw.gov.uk [194.83.155.210]) by svr1.postgresql.org (Postfix) with ESMTP id 13C52D1B510 for ; Wed, 1 Oct 2003 06:52:18 -0300 (ADT) Received: from [192.168.253.7] (helo=host3.hq.ccw.gov.uk) by host5.ccw.gov.uk with esmtp (Exim 4.20) id 1A4egq-0008IS-4E for pgsql-sql@postgresql.org; Wed, 01 Oct 2003 11:58:40 +0100 Received: from groupwise.ccw.gov.uk ([192.168.24.30]) by host3.ccw.gov.uk with esmtp (Exim 4.14) id 1A4dgV-0007VG-IX for pgsql-sql@postgresql.org; Wed, 01 Oct 2003 10:54:15 +0100 Received: from CCW_Gateways-MTA by groupwise.ccw.gov.uk with Novell_GroupWise; Wed, 01 Oct 2003 09:52:09 +0100 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.0.2 Date: Wed, 01 Oct 2003 10:51:59 +0100 From: "Gordon Ross" To: Mime-Version: 1.0 Content-Disposition: inline X-SA-Exim-Mail-From: G.Ross@ccw.gov.uk Subject: Determining Inheritance Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SA-Exim-Version: 3.1 (built Wed Sep 10 12:33:08 BST 2003) X-SA-Exim-Scanned: Yes X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/6 X-Sequence-Number: 15406 Is there any way to determine which table a row belows to, if I do a search on the top level table: e.g. I have a table called "BASE". There are two tables which inherit from "BASE" called "SUBTABLE1" and "SUBTABLE2" If I do a SELECT * FROM BASE WHERE blah; how can I tell which table (either SUBTABLE1 or SUBTABLE2) a row comes from ? Do I need to add an extra column to BASE to specify which table a row really belongs to ? (If it helps or hinders, I am ultimately going to be doing this via JDBC) Thanks, GTG Gordon Ross, Network Manager/Rheolwr Rhydwaith Countryside Council for Wales/Cyngor Cefn Gwlad Cymru