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

Поиск
Список
Период
Сортировка
От Kouhei Kaigai
Тема Re: Use %u to print user mapping's umid and userid
Дата
Msg-id 9A28C8860F777E439AA12E8AEA7694F8011CA69D@BPXM15GP.gisp.nec.co.jp
обсуждение исходный текст
Ответ на Re: Use %u to print user mapping's umid and userid  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
Список pgsql-hackers
> -----Original Message-----
> From: pgsql-hackers-owner@postgresql.org
> [mailto:pgsql-hackers-owner@postgresql.org] On Behalf Of Etsuro Fujita
> Sent: Monday, March 14, 2016 4:59 PM
> To: Ashutosh Bapat; Tom Lane
> Cc: pgsql-hackers
> Subject: Re: [HACKERS] Use %u to print user mapping's umid and userid
> 
> Hi,
> 
> On 2016/02/09 14:09, Ashutosh Bapat wrote:
> > 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.
> 
> I think the following umid handling in postgresGetForeignPlan has the
> same issue:
> 
>      /*
>       * Build the fdw_private list that will be available to the executor.
>       * Items in the list must match order in enum FdwScanPrivateIndex.
>       */
>      fdw_private = list_make4(makeString(sql.data),
>                               retrieved_attrs,
>                               makeInteger(fpinfo->fetch_size),
>                               makeInteger(foreignrel->umid));
> 
> I don't think it's correct to use makeInteger for the foreignrel's umid.
>
BTW, use of ExtensibleNode allows to forget problems come from data format
translation.

--
NEC Business Creation Division / PG-Strom Project
KaiGai Kohei <kaigai@ak.jp.nec.com>

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Re: Use %u to print user mapping's umid and userid
Следующее
От: Petr Jelinek
Дата:
Сообщение: Re: Logical decoding slots can go backwards when used from SQL, docs are wrong