RE: Re: DB porting questions...

Поиск
Список
Период
Сортировка
От Michael Fork
Тема RE: Re: DB porting questions...
Дата
Msg-id Pine.BSI.4.21.0104181743400.5220-100000@glass.toledolink.com
обсуждение исходный текст
Ответ на RE: Re: DB porting questions...  ("Diehl, Jeffrey" <jdiehl@sandia.gov>)
Список pgsql-sql
On Wed, 18 Apr 2001, Diehl, Jeffrey wrote:

<snip>
> Querying the entire database is difficult, and very important to me.  
> I tried to setup a "view of a union" scheme.  That isn't supported.  
> Right now I am using a perl function to rewrite my sql in such a way
> that it queries any of the tables I want and coelesces the output.  
> Aggregate functions even work with this method.
</snip>

To get around this same problem, I created a base table from which all
other tables were inherited.  Doing this allows for you to query on 1
table, or all data easily.

i.e.

CREATE TABLE wwwlogs (id INT4, url TEXT);
CREATE TABLE wwwlogs_041801 INHERITS (wwlogs);
CREATE TABLE wwwlogs_041701 INHERITS (wwlogs);

HTH...

Michael Fork - CCNA - MCP - A+
Network Support - Toledo Internet Access - Toledo Ohio


<snip>
> Querying the entire database is difficult, and very important to me.  I
> tried to setup a "view of a union" scheme.  That isn't supported.  Right now
> I am using a perl function to rewrite my sql in such a way that it queries
> any of the tables I want and coelesces the output.  Aggregate functions even
> work with this method.
</snip>



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

Предыдущее
От: Martín Marqués
Дата:
Сообщение: groups in postgres
Следующее
От: Grant
Дата:
Сообщение: Re: Timezone conversion