Re: [COMMITTERS] pgsql: Don't use OidIsValid to check the return value of

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [COMMITTERS] pgsql: Don't use OidIsValid to check the return value of
Дата
Msg-id 17982.1229788556@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: [COMMITTERS] pgsql: Don't use OidIsValid to check the return value of  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
heikki@postgresql.org (Heikki Linnakangas) writes:
> Don't use OidIsValid to check the return value of transformGenericOptions,
> because transformGenericOptions returns an array, not an Oid. I'm not
> sure if this fixes the crashes seen in buildfarm, but it should be fixed
> anyway.

Definitely a necessary fix, but you missed what I think is actually
causing the crashes:
         if (PointerIsValid(DatumGetPointer(datum)))
!             repl_val[Anum_pg_foreign_data_wrapper_fdwoptions - 1] = ObjectIdGetDatum(datum);

should be
         if (PointerIsValid(DatumGetPointer(datum)))
!             repl_val[Anum_pg_foreign_data_wrapper_fdwoptions - 1] = datum;

ObjectIdGetDatum probably is zeroing the high-order half of the pointer
datum.

I committed this along with some other cosmetic fixes.

Somebody still needs to fix the MSVC build scripts...
        regards, tom lane


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

Предыдущее
От: Markus Wanner
Дата:
Сообщение: Re: Sync Rep: First Thoughts on Code
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: SQL/MED catalog manipulation facilities This doesn't do any