Identifying user-created objects - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Identifying user-created objects
Date
Msg-id CA+fd4k7Zr+yQLYWF3O_KjAJyYYUZFBZ_dFchfBvq5bMj9GgKQw@mail.gmail.com
Whole thread Raw
Responses Re: Identifying user-created objects  (Amit Langote <amitlangote09@gmail.com>)
Re: Identifying user-created objects  (Fujii Masao <masao.fujii@oss.nttdata.com>)
List pgsql-hackers
Hi,

User can create database objects such as functions into pg_catalog.
But if I'm not missing something, currently there is no
straightforward way to identify if the object is a user created object
or a system object which is created during initdb. If we can do that
user will be able to check if malicious functions are not created in
the database, which is important from the security perspective.

I've attached PoC patch to introduce a SQL function
pg_is_user_object() that returns true if the given oid is user object
oid, that is greater than or equal to FirstNormalObjectId. Feedback is
very welcome.

Regards,

-- 
Masahiko Sawada            http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions
Next
From: Emil Iggland
Date:
Subject: Re: BUG #15858: could not stat file - over 4GB