table inheritance

From: "Shuying Wang" <wang(dot)shuying(dot)lists(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: table inheritance
Date: 2006-02-22 05:39:12
Message-ID: bbf221f60602212139k3e927cf1o732d0478d27a5ade@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

I've got table x and table y which inherits table x. I want to get
items from table x which are not in table y. According to the
PostgreSQL documentation, the syntax would be "select * FROM ONLY x"
however this yields no rows, whereas something like "select * from x
where id not in (select id from y) " gives me what I want. Could
someone explain to me what I'm doing wrong using ONLY?

Thanks in advance,
Shuying

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Fuhr 2006-02-22 05:56:56 Re: table inheritance
Previous Message sconeek 2006-02-22 05:04:48 Newbie basic and silly question