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
> 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.

Laurenz Albe

Attachment: 0001-Add-PGDLLEXPORT-to-sample-C-function.patch
Description: 0001-Add-PGDLLEXPORT-to-sample-C-function.patch

Attachment: 0002-Add-instructions-for-building-C-functions-with-MSVC.patch
Description: 0002-Add-instructions-for-building-C-functions-with-MSVC.patch

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to