query for all values linked to a field

From: anisoptera <dragonfly(at)elseworld(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: query for all values linked to a field
Date: 2011-12-13 20:37:57
Message-ID: 1323808677751-5072691.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hi,

i'm trying to output all values that can be reached from a specific record
by a foreign key link.

for example, if tblimage has image_id, image_info and tblstack has
stack_id=tblimage.image_id, stack_info_1, stack_info_2
i want to be able to get image_id, image_info, stack_info_1, stack_info_2.

of course, my database has many more tables and links. i can use
information_schema to get the links and recursively troll through all the
tables, i was just wondering if there's a way to do this with one query
instead of programmatically.

thanks,
jenn

--
View this message in context: http://postgresql.1045698.n5.nabble.com/query-for-all-values-linked-to-a-field-tp5072691p5072691.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2011-12-13 20:51:24 Re: query for all values linked to a field
Previous Message Merlin Moncure 2011-12-13 16:59:13 Re: order of (escaped) characters in regex range