Re: Use %u to print user mapping's umid and userid
От | Ashutosh Bapat |
---|---|
Тема | Re: Use %u to print user mapping's umid and userid |
Дата | |
Msg-id | CAFjFpRdAoQ3s1Rj8-kqLx09Ua93bmNhNdCUB5TpgfF2-MPv4rA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Use %u to print user mapping's umid and userid (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Use %u to print user mapping's umid and userid
|
Список | pgsql-hackers |
Sorry, I was wrong. For public user mapping userid is 0 (InvalidOid), which is returned as is in UserMapping object. I confused InvalidOid with -1. Sorry for the confusion.
--
On Tue, Feb 9, 2016 at 10:21 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> writes:
> 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.
If that is actually how it works, it's broken and I'm going to insist
on a redesign. There is nothing anywhere that says that 0xffffffff
is not a valid OID.
regards, tom lane
--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company
В списке pgsql-hackers по дате отправления: