Re: Use %u to print user mapping's umid and userid

From: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
To: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Use %u to print user mapping's umid and userid
Date: 2016-05-11 07:49:27
Message-ID: CAFjFpRdeWAs9rypTkKr3_K3vas39oH4OMo8aYO2DrF0aGosuOw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 11, 2016 at 1:10 PM, Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
wrote:

> On 2016/05/10 16:56, Etsuro Fujita wrote:
>
>> Here is a patch to fix this.
>>
>
> I found that the previous patch handles the ForeignScan's fs_relids
> Bitmapset destructively. Also, I noticed that I removed some existing
> comments inadvertently. So, I'm attaching the updated patch to fix those
> things. I'll add this to the next CF. I think this should be addressed in
> advance of the release of 9.6, though.
>
>
The patch is calculating user mapping when it's readily available through
RelOptInfo::fdw_private. That incurs a catalog lookup unnecessarily.
Instead, can we add new function makeOid, oidVal on the lines of
makeInteger and intVal to store and retrieve an OID resp. and also
corresponding print function? It might be helpful in future.

--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2016-05-11 08:04:58 Re: Use %u to print user mapping's umid and userid
Previous Message Etsuro Fujita 2016-05-11 07:44:27 Re: Odd oid-system-column handling in postgres_fdw