Re: pg_dump: CREATE TABLE + CREATE RULE vs. relreplident

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: pg_dump: CREATE TABLE + CREATE RULE vs. relreplident
Дата
Msg-id 87y4n2qra4.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на pg_dump: CREATE TABLE + CREATE RULE vs. relreplident  (Marko Tiikkaja <marko@joh.to>)
Ответы Re: pg_dump: CREATE TABLE + CREATE RULE vs. relreplident  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
>>>>> "Marko" == Marko Tiikkaja <marko@joh.to> writes:
Marko> Hi,
Marko> My colleague Per Lejontand brought to my attention that whenMarko> dumping views with circular dependencies from
apostgres versionMarko> older than 9.4 using a recent pg_dump, the SQL looks somethingMarko> like the following:
 
Marko>   create table qwr();Marko>   create rule "_RETURN" as on select to qwr do instead select;

I've wondered for a while whether this wouldn't have been better handled
as:

create view qwr(colnames...) as select null::type1, null::type2, ...;
/* ... */
create or replace view qwr as ...;

-- 
Andrew (irc:RhodiumToad)



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

Предыдущее
От: Marko Tiikkaja
Дата:
Сообщение: pg_dump: CREATE TABLE + CREATE RULE vs. relreplident
Следующее
От: David Fetter
Дата:
Сообщение: Re: OOM-killer issue when updating a inheritance table which has large number of child tables