Re: Schema boggle...

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Schema boggle...
Дата
Msg-id 13385.1068068041@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Schema boggle...  (Chris Bowlby <excalibur@hub.org>)
Ответы Re: Schema boggle...
Список pgsql-hackers
Chris Bowlby <excalibur@hub.org> writes:
>  As you can see this is a nice, clean way to break down some datasets.
> But, if I do:

>  set search_path to public, test_001, test_002;

>  I only get access to the tables in test_001 and public, the tables in
> test_002 are not listed, and thus I do not see them on the screen while
> doing a "\d".

Well, sure.  They are masked by the identically named tables in
test_001.  How else would you expect it to work?

> 2. Issue 2, is more a SQL issue then anything, but I'd like to be able
> to do something to the affect of:

>  SELECT * FROM test_*.test_domains ORDER BY domain_name;

I can't see trying to support this at the SQL level.  You might consider
making a plpgsql function that constructs a UNION ALL query listing all
the proper schemas and then EXECUTEs it on-the-fly.

Another possible solution is to make all the individual tables be
inheritance children of a master table.  Then selecting from the master
would work (and would be equivalent to the UNION performance-wise, I
think).
        regards, tom lane


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

Предыдущее
От: Manfred Spraul
Дата:
Сообщение: Re: Performance features the 4th
Следующее
От: Tom Lane
Дата:
Сообщение: Re: \xDD patch for 7.5devel