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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


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?


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


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