About copy to view

From: Jinhua Luo <luajit(dot)io(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: About copy to view
Date: 2019-09-17 11:33:19
Message-ID: CAAc9rOzpzgB6kCZFgjE441KHT=LkqzEGsbo2xhqtr5CFr-igGg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Why view needs instead of trigger to be the target of "copy to"?
With default view rule, the insert would be successful, so it should
also works for copy.

The reason to ask this question is I need to "copy to" the view using
"replica" session role. But instead of trigger on view could not be
set to "enable always" or "enable replica", because "alter table"
would error it's not a base table, e.g.

tmp=# alter table foobar2_view enable always trigger foobar2_view_trigger;
ERROR: "foobar2_view" is not a table or foreign table

Help please, thanks.

Regards,
Jinhua Luo

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Sharma 2019-09-17 11:35:59 Re: Support for CALL statement in ecpg
Previous Message Leif Gunnar Erlandsen 2019-09-17 11:23:45 pause recovery if pitr target not reached