3
CREATE FUNCTION uuid_generate_v1()
RETURNS uuid
AS '$libdir/uuid-ossp', 'uuid_generate_v1'
VOLATILE STRICT LANGUAGE C;

运行此脚本时出现此错误。这个错误是什么意思,我该如何纠正它?Postgres 用户拥有对 postgresql 文件夹的完全访问权限。我还尝试在真正的 Windows 2003 Server 机器上运行它,结果相同。

库路径是C:\PostgreSQL\9.1\lib\uuid-ossp.dll

PostgreSQL-9.1.2-1,WindowsXP SP3 (VirtualBox)。

4

3 回答 3

5

感谢上帝,问题解决了。

uuid-ossp从 PostgreSQL 9.2 开始需要MSVCRT.DLL v7.0.2600.5512. 需要安装“Microsoft Visual C++ 2008 Redistributable Package”。之后Windows\WinSxS应该包含此库的清单和策略,名称如x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375,然后uuid-ossp应该可以正常工作。

值得注意的是PostgreSQL的安装目录应该有users组的写权限才能在Windows XP下正常工作

于 2012-11-22T13:12:02.540 回答
1

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.

于 2012-10-24T16:25:15.587 回答
1

在 postgresql-9.0.6 遇到这个问题后,我们通过使用此处的修补 uuid 库从官方 postgresql 发行版重新编译 uuid-ossp 扩展来解决它(我想你也应该自己构建这个库)。

需要注意的是,这已经在正版Windows上进行过,而盗版则没有这个问题。

于 2012-02-28T09:30:05.640 回答