is there a 'table' data type in pg?

From: Louis-David Mitterrand <vindex+lists-pgsql-sql(at)apartia(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: is there a 'table' data type in pg?
Date: 2007-07-24 12:42:46
Message-ID: 20070724124246.GA22602@apartia.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello,

In my forum app a new post can be related to several types of objects:
person, location, event, simple text subject, etc. so in my 'forum'
table I plan to add an id_subject column which can contain a reference
to any number of different tables (location, person, etc.). What I need
to know is to _what_ table the id_subject belongs.

Can I use a another column to store the type of the id_subject (ie: the
tabled it belongs to) ? Then I would be able to query that table for
additional info to print alongside the forum posts.

Thanks for your insights,

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Gregory Stark 2007-07-24 14:10:44 Re: is there a 'table' data type in pg?
Previous Message Jyoti Seth 2007-07-24 07:45:56 Re: Database Synchronization