> I want this:
> name    table_name
> 'blabla'   blue
> 'bubu'    blue
> 'haha'    red
> 'kkk'      red
> 
> Could I?

Here is an example from the table inheritance chapter:

SELECT p.relname, c.name, c.altitude
FROM cities c, pg_class p
WHERE c.altitude > 500 and c.tableoid = p.oid;

which returns: 

 relname  |   name    | altitude
----------+-----------+----------
 cities   | Las Vegas |     2174
 cities   | Mariposa  |     1953
 capitals | Madison   |      845

http://www.postgresql.org/docs/8.2/interactive/ddl-inherit.html

it should do what you want.

Regards,

Richard Broersma Jr.

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to