Re: Search inherited tables

From: Chris <chrisb(at)nimrod(dot)itg(dot)telstra(dot)com(dot)au>
To: Stephan Richter <srichter(at)cbu(dot)edu>
Cc: PGSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Search inherited tables
Date: 2000-09-11 00:50:13
Message-ID: 39BC2C45.E7617984@nimrod.itg.telecom.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Well this is a common request, and a problem that I personally have been
looking at solving, but right now you can't do it in a straight-forward
way. You just have to make a separate query on each table. The
inheritance will only help you if there is some commonality in the base
table that you can do more general queries on. Hopefully in the future
you will be able to do what you want.

Stephan Richter wrote:
>
> Hello everyone,
>
> I have he following situation:
>
> I have a 'base' table called Problem and 5 other tables that inherit
> Problem: MultipleChoiceProblem, TrueFalseProblem, EssayProblem,
> NumericProblem and MatchProblem
>
> I want to do the following query:
>
> SELECT * FROM Problem;
>
> But Problem is empty, since I fill only the derived tables. How can I make
> this query?
>
> Thanks for your help in advance!
>
> Regards,
> Stephan
> --
> Stephan Richter
> CBU - Physics and Chemistry Student
> Web2k - Web Design/Development & Technical Project Management

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marcin Mazurek 2000-09-11 06:35:45 Re: count(*) from view??
Previous Message Chris McNett 2000-09-10 23:12:35 ecpg