Re: Mirroring a DB

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Mirroring a DB
Дата
Msg-id Pine.LNX.4.20.9912110244240.1875-100000@localhost.localdomain
обсуждение исходный текст
Ответ на Mirroring a DB (was Re: [GENERAL] \d shows all my tables twice)  (Karl DeBisschop <kdebisschop@range.infoplease.com>)
Ответы Re: Mirroring a DB
Список pgsql-general
On 1999-12-10, Karl DeBisschop mentioned:

>  pg_dump -o -h <live> <table> | psql -h <mirror> <table>
>
> This generally works, but has a habit recreating the views as actual
> tables.  Often you can live with this, and there may be a simple way
> to prevent it.  I just haven't found one yet.

I view *is* a table, with a ON SELECT rule on it. So writing

CREATE TABLE foo ( ... );
CREATE RULE _RETfoo AS ON SELECT DO INSTEAD SELECT your_stuff_here;

is equivalent to

CREATE VIEW foo AS SELECT your_stuff_here;

Perhaps it would be nicer if the dump contained the second version, but
you're not supposed to read these dumps (in case you didn't know :).

--
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



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

Предыдущее
От: Sanchez Diaz Sonia
Дата:
Сообщение: doubt about UNIX!!!
Следующее
От: Scott Beasley
Дата:
Сообщение: First draft of pg_group admin tool.