Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) - Mailing list pgsql-hackers

From Andrei Lepikhov
Subject Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)
Date
Msg-id 760ee97a-e336-4d7b-9477-9d9e99370097@postgrespro.ru
Whole thread Raw
In response to Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)  (Damir Belyalov <dam.bel07@gmail.com>)
Responses Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)  (jian he <jian.universality@gmail.com>)
List pgsql-hackers
On 14/11/2023 17:10, Damir Belyalov wrote:
>       Here is a very straw-man-level sketch of what I think might work.
>       The option to COPY FROM looks something like
> 
>            ERRORS TO other_table_name (item [, item [, ...]])
> 
> 
> I tried to implement the patch using a table and came across a number of 
> questions.
> 
> Which table should we implement for this feature: a system catalog table 
> or store this table as a file or create a new table?
> 
> In these cases, security and user rights management issues arise.
> It is better for other users not to see error lines from another user. 
> It is also not clear how access rights to this table are inherited and 
> be given.

Previous reviews have given helpful ideas about storing errors in the 
new table.
It should be trivial code - use the current table name + 'err' + suffix 
as we already do in the case of conflicting auto-generated index names.
The 'errors table' must inherit any right policies from the table, to 
which we do the copy.

-- 
regards,
Andrei Lepikhov
Postgres Professional




pgsql-hackers by date:

Previous
From: "Zhijie Hou (Fujitsu)"
Date:
Subject: RE: Synchronizing slots from primary to standby
Next
From: David Rowley
Date:
Subject: Don't use bms_membership in places where it's not needed