On Wed, Aug 4, 2010 at 6:32 PM, Rikard Bosnjakovic
<rikard(dot)bosnjakovic(at)gmail(dot)com> wrote:
> A more readable output:
>
> # select id, name, subcategory_1, subcategory_2 from categories where id > 3;
> id | name | subcategory_1 | subcategory_2
> ----+-------+---------------+---------------
> 4 | IC | |
> 6 | Logic | 4 |
> 10 | CMOS | | 6
> 11 | TTL | | 6
Are you trying to model entity inheritance with this design?
--
Regards,
Richard Broersma Jr.
Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug