fboulnois / pg_uuidv7

A tiny Postgres extension to create version 7 UUIDs
Mozilla Public License 2.0
270 stars 23 forks source link

Added Windows DLL support #23

Open chris-pikul opened 6 months ago

chris-pikul commented 6 months ago

Hello all, I quickly setup the MSVC project for compiling to a DLL for Windows installation.

The changes this makes:

I have built, installed, and tested this extension on Postgres 16 Windows 11 x64 with no issue.

The .sql and .control where un-changed.

fboulnois commented 5 months ago

I'm not a huge fan of adding Visual Studio specific build files or adding a Windows-specific version of clock_gettime, although Windows support is useful.

Would cross-compiling be an option? If so, this could avoid the clock_gettime dependency. If not, perhaps there's a solution using timespec_get or the Postgres built-in version of gettimeofday?

For the Windows build, perhaps a batch file could work instead? This is more portable, and is how luajit does it, for example.