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

Identify an inherited table

From: Bo Lorentsen <bl(at)netgroup(dot)dk>
To: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Identify an inherited table
Date: 2001-08-24 06:45:24
Message-ID: 3B85F804.AF5997D5@netgroup.dk (view raw or flat)
Thread:
Lists: pgsql-novice
Hi ...

When using a database with inherited tables it somtimes would be nice if
the row you are looking at is a base, a child or even a grandchild type.
Like this :

    SELECT id, type() FROM base;

id  | unknown
----------
1   | base
2   | child

Or something like this.

Is this possible or does this include alot funny SQL to gain ?

/BL


Responses

pgsql-novice by date

Next:From: Luke TudorDate: 2001-08-24 08:56:38
Subject: Users which aren't users?
Previous:From: Bo LorentsenDate: 2001-08-24 06:38:43
Subject: Re: integrity and inherit

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