How about to have relnamespace and relrole?

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: How about to have relnamespace and relrole?
Date: 2015-02-03 09:49:41
Message-ID: 20150203.184941.152750602.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

Most of OID types has reg* OID types. Theses are very convenient
when looking into system catalog/views, but there aren't OID
types for userid and namespace id.

What do you think about having these new OID types? The
usefulness of regnamespace is doubtful but regrole should be
useful because the column like 'owner' appears many places.

For example this works as follows.

====
SELECT relnamespace::regnamespace, relname, relowner::regrole
FROM pg_class WHERE relnamespace = 'public'::regnamespace;

relnamespace | relname | relowner
--------------+---------+----------
public | t1 | horiguti
(1 row)

What do you think about this?

regards,

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
0001-Add-regnamespace.patch text/x-patch 12.5 KB
0002-Add-regrole.patch text/x-patch 14.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marco Nenciarini 2015-02-03 10:03:30 Re: File based Incremental backup v9
Previous Message Andres Freund 2015-02-03 09:41:21 Re: Hot Standby WAL reply uses heavyweight session locks, but doesn't have enough infrastructure set up