Table alias and inherited tables

From: Amol Chiplunkar <amol(dot)chiplunkar(at)oracle(dot)com>
To: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Table alias and inherited tables
Date: 2010-05-05 05:42:08
Message-ID: 4BE10530.408@oracle.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I notice that for the following:

Table Base with say columns col1, col2

Table Child1 inherits(Base)
Table Child2 inherits(Base)

With check constraints and rules to insert the rows to appropriate
tables defined.

Inserts work as expected.
select * from Base; returns rows from both the children

But something like

select b from base b where b.col1=<condition>;

returns 0 rows even when there are rows in one of the child tables
that satisfy the condition.
Is this expected ?

thx
- Amol

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Konstantin Izmailov 2010-05-05 05:52:40 Savepoint and prepared transactions
Previous Message John R Pierce 2010-05-05 05:12:14 Re: How can I be confirm that data is encrypted over the network using SSL