Re: Identifying user-created objects - Mailing list pgsql-hackers

From Amit Langote
Subject Re: Identifying user-created objects
Date
Msg-id CA+HiwqG2TFaravTp8N-61mBFYmZqxAre9daYvh52d6FccfHD7A@mail.gmail.com
Whole thread Raw
In response to Re: Identifying user-created objects  (Masahiko Sawada <masahiko.sawada@2ndquadrant.com>)
List pgsql-hackers
On Wed, Feb 26, 2020 at 4:48 PM Masahiko Sawada
<masahiko.sawada@2ndquadrant.com> wrote:
> On Thu, 13 Feb 2020 at 17:13, Julien Rouhaud <rjuju123@gmail.com> wrote:
> > On Thu, Feb 13, 2020 at 8:32 AM Amit Langote <amitlangote09@gmail.com> wrote:
> > > Maybe we could document that pg_is_user_object() and its internal
> > > counterpart returns true only for objects that are created during
> > > "normal" multi-user database operation.
> >
> > +1
>
> Agreed.
>
> Attached updated version patch.

Thanks for updating the patch.  Some comments:

+      <row>
+       <entry><literal><function>pg_is_user_object(<parameter>oid</parameter>)</function></literal></entry>
+       <entry><type>bool</type></entry>
+       <entry>
+        true if <parameter>oid</parameter> is the object which is
created during
+        normal multi-user database operation.
+       </entry>
+      </row>

How about clarifying the description further as follows:

"true for objects created while database is operating in normal
multi-user mode, as opposed to single-user mode (see <xref
linkend="app-postgres"/>)."

Term "multi-user operation" is not mentioned elsewhere in the
documentation, so better to clarify what it means.

Also, maybe a minor nitpick, but how about adding the new function's
row at the end of the table (Table 9.72) instead of in the middle?

Other than that, patch looks to be in pretty good shape.

Thanks,
Amit



pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Autovacuum on partitioned table
Next
From: Mahendra Singh Thalor
Date:
Subject: Re: Assert failure due to "drop schema pg_temp_3 cascade" fortemporary tables and \d+ is not showing any info after drooping temp table schema