Re: query for all values linked to a field

Поиск
Список
Период
Сортировка
От anisoptera
Тема Re: query for all values linked to a field
Дата
Msg-id 1323810181337-5072765.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: query for all values linked to a field  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-general
Merlin Moncure-2 wrote
>
>
> I didn't quite parse that.    Using recursive queries, it should be
> able to pretty easily query out, given a table name, all tables that
> link to that table and the columns of the keys in the constraints
> (and, if necessary, the links from other tables to those tables).
>
> If I was looking for specific *records*, not tables and columns, I
> would probably be generating a query from the above.  (If I'm
> understanding you properly that is).
>

i'm trying to get all the values linked to a specific record, ideally with
table/column names.
so my output (given the structure i showed above) would be more like:
tblimage   image_id        image_id-value
tblimage   image_info     image_info-value
tblstack    stack_info_1  stack_info-value
tblstack    stack_info_2  stack_info-value

i didn't know about recursive queries; guess i'll start by looking that up.

thanks,
jenn
 i didn't know about recursive queries; i'll look that up.

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

В списке pgsql-general по дате отправления:

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: query for all values linked to a field
Следующее
От: Jay Levitt
Дата:
Сообщение: Re: Controlling complexity in queries