From: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
---|---|
To: | "'Albe Laurenz *EXTERN*'" <laurenz(dot)albe(at)wien(dot)gv(dot)at-extern>, "'Tom Lane *EXTERN*'" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Add PGDLLEXPORT to PG_FUNCTION_INFO_V1 |
Date: | 2016-10-17 14:51:02 |
Message-ID: | A737B7A37273E048B164557ADEF4A58B53959CBC@ntex2010a.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I wrote:
> But I'd understand if you think that this is too much code churn for too little
> benefit, even if it could be considered a clean-up.
>
> In that case, I'd argue that in the sample in doc/src/sgml/xfunc.sgml
> the function definitions should be changed to read
>
> PGDLLEXPORT Datum foo(PG_FUNCTION_ARGS)
>
> instead of
>
> Datum foo(PG_FUNCTION_ARGS)
>
> because without that the sample fails if you try to build it with MSVC
> like the stackoverflow question did.
Since I didn't hear from you, I assume that you are not in favour of
removing the SQL function declarations from contrib.
So I went ahead and wrote a patch to add PGDLLEXPORT to the C function sample.
While at it, I noticed that there are no instructions for building and
linking C functions with MSVC, so I have added a patch for that as well.
Yours,
Laurenz Albe
Attachment | Content-Type | Size |
---|---|---|
0001-Add-PGDLLEXPORT-to-sample-C-function.patch | application/octet-stream | 2.3 KB |
0002-Add-instructions-for-building-C-functions-with-MSVC.patch | application/octet-stream | 1.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Shay Rojansky | 2016-10-17 14:51:15 | Re: macaddr 64 bit (EUI-64) datatype support |
Previous Message | Tom Lane | 2016-10-17 14:50:23 | Re: [COMMITTERS] pgsql: Replace PostmasterRandom() with a stronger way of generating ran |