Re: Problem with compiling extensions with Postgres Version 13

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Problem with compiling extensions with Postgres Version 13
Дата
Msg-id d69a30f15c5f23e3e154b52cf25224aa00bdcf85.camel@cybertec.at
обсуждение исходный текст
Ответ на Problem with compiling extensions with Postgres Version 13  (Eric Svenson <esvenson74@googlemail.com>)
Список pgsql-general
On Wed, 2020-11-18 at 14:46 +0100, Eric Svenson wrote:
> I am not really sure if I am in the right mailing list, but I try it here first.
> 
> I have written a postgres C extension as DLL which was used with Postgres 9.2 successfully.
> 
> Now I am trying to upgrade to Postgres 13 but I ran into a compile problem.
> 
> The function
> 
> PG_GETARG_BYTEA_P 
> 
> causes the compile error
> 
> error LNK2019: unresolved external symbol _pg_detoast_datum referenced in function _compressBytea
> 
> The Compiler is
> Microsoft Visual Studio 2010 
> Windows 10
> 
> Any idea what to do? Is PG_GETARG_BYTEA_P obsolete?

In PostgreSQL v13, "PG_GETARG_BYTEA_P(n)" is a macro that resolves to
"((bytea *) pg_detoast_datum((struct varlena *) DatumGetPointer(fcinfo->args[n].value)))".

This has not changed since 9.2, as far as I can tell.

The underscore in front of the function name is relevant: perhaps you compile your function
using a different "calling convention" than was used to build PostgreSQL?

Sorry, but I am not a Windows expert.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




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

Предыдущее
От: Snjezana Frketic
Дата:
Сообщение: Re: How to select values in a JSON type of column?
Следующее
От: Ron
Дата:
Сообщение: Re: psql backward compatibility