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 CAFjFpRdwW15rDW05NTKR9ZqAr6RFW1Wgat=o-cvMto1T60yhYQ@mail.gmail.com
Whole thread Raw
In response to Re: Use %u to print user mapping's umid and userid  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Use %u to print user mapping's umid and userid
Re: Use %u to print user mapping's umid and userid
List pgsql-hackers
Sorry to come to this late.

The userid being printed is from UserMapping. The new API GetUserMappingById() allows an FDW to get user mapping by its OID. This API is intended to be used by FDWs to fetch the user mapping inferred by the core for given join between foreign relations. In such user mapping object , userid may be -1 for a public user mapping. I think using %u for -1 will print it as largest integer. Would that create confusion for users?

On Mon, Feb 8, 2016 at 9:37 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp> writes:
> Here is a patch to use %u not %d to print umid and userid.

Pushed, thanks.

                        regards, tom lane


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



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

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Support for N synchronous standby servers - take 2
Next
From: Michael Paquier
Date:
Subject: Re: Support for N synchronous standby servers - take 2