Reputation: 2519
CREATE FUNCTION uuid_generate_v1()
RETURNS uuid
AS '$libdir/uuid-ossp', 'uuid_generate_v1'
VOLATILE STRICT LANGUAGE C;
I get this error when I run this script. What does this error mean and how can I rectify it? Postgres user has full access to postgresql folder. I also tried to run it on a real Windows 2003 Server machine with the same result.
The library path is C:\PostgreSQL\9.1\lib\uuid-ossp.dll
PostgreSQL-9.1.2-1, WindowsXP SP3 (VirtualBox).
Upvotes: 3
Views: 2556
Reputation: 2519
Thank God the problem is solved.
uuid-ossp
from PostgreSQL 9.2 requires MSVCRT.DLL v7.0.2600.5512
. It's needed to install "Microsoft Visual C++ 2008 Redistributable Package". After that Windows\WinSxS
should contain manifests and policies for this library with names like x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375
, then uuid-ossp
should work correctly.
It's worth noting that the PostgreSQL installation directory should have write permissions for users
group to work correctly under Windows XP
Upvotes: 5
Reputation: 21
Had the same problem today, installing a .NET 4 based application both on a Windows XP SP3 and Windows 2003 Standard. On another Windows XP SP3 I had no issues. So I thought that the problem was about configuration. I found that the working machine had .NET 1.x, 2.0, 3.0, 3.5 and 4 installed. The not-working machines had only 1.x and 4, instead.
Installed .Net 3.5 (that, as Microsoft says, contains updates for both 2.0 and 3.0) and it worked, without touching the Postgres install!
I'm curious to try to install it on a VM (I had the same problem, in the past, but I thought it was something involved with the VM itself...), I'll do as soon as I get some spare time.
Upvotes: 1
Reputation: 63
Having encountered this problem with postgresql-9.0.6, we solved it by recompiling uuid-ossp extension from the official postgresql distribution using a patched uuid library from here (I suppose you should build this library by yourself too).
It should be noted that this has been performed on genuine Windows, while pirated versions do not have this problem.
Upvotes: 1