From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
---|---|
To: | Eric Svenson <esvenson74(at)googlemail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Problem with compiling extensions with Postgres Version 13 |
Date: | 2020-11-18 17:01:49 |
Message-ID: | d69a30f15c5f23e3e154b52cf25224aa00bdcf85.camel@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Ron | 2020-11-18 17:14:02 | Re: psql backward compatibility |
Previous Message | Snjezana Frketic | 2020-11-18 16:56:26 | Re: How to select values in a JSON type of column? |