Re: Use %u to print user mapping's umid and userid - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: Use %u to print user mapping's umid and userid
Date
Msg-id CAFjFpRdeWAs9rypTkKr3_K3vas39oH4OMo8aYO2DrF0aGosuOw@mail.gmail.com
Whole thread Raw
In response to Re: Use %u to print user mapping's umid and userid  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
Responses Re: Use %u to print user mapping's umid and userid  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
List pgsql-hackers


On Wed, May 11, 2016 at 1:10 PM, Etsuro Fujita <fujita.etsuro@lab.ntt.co.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

pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: Odd oid-system-column handling in postgres_fdw
Next
From: Etsuro Fujita
Date:
Subject: Re: Use %u to print user mapping's umid and userid