getting inherited table name

From: Eric Kolve <ekolve(at)corp(dot)classmates(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: getting inherited table name
Date: 2001-09-06 12:01:41
Message-ID: 3B9765A5.ED5A5DC@corp.classmates.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In the pgsql tutorial two tables are created capitals inherits cities.

When you do SELECT * FROM cities, you get both capitals and cities. Is
there anyway to get get the name of the table so I could possibly know
the 'type' it was? Or should this be maintained as a separate column
'city_type' that has a value of 'capital'?

Suppose I had another table river_cities and what I would want to be
able to is SELECT * FROM cities and know whether the city was a
river_city, capital, or nothing at all.

thanks,
--eric

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Gould 2001-09-06 12:20:14 template0 and template1 databases
Previous Message Jefim Matskin 2001-09-06 11:21:25 a simple programming question