Re: Cannot convert partitioned table to a view

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kouber Saparev <kouber(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Cannot convert partitioned table to a view
Date: 2022-10-06 14:02:10
Message-ID: 2662605.1665064930@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kouber Saparev <kouber(at)gmail(dot)com> writes:
> I noticed that attaching the "_RETURN" rule to a table converts it to a
> view, and the operation is irreversible, i.e. once attached, I cannot drop
> the rule and put the relation back to a table one.

That is an ancient backwards-compatibility hack that you should not
rely on, and most certainly shouldn't try to make use of from user
code. It exists because very ancient versions of pg_dump didn't
know how to dump views as views. We're more likely to rip it out
as no-longer-needed than to expand what it does.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2022-10-06 14:24:39 pg_restore creates public schema?
Previous Message Kouber Saparev 2022-10-06 12:26:33 Cannot convert partitioned table to a view