简体   繁体   English

如何在 Windows 10 中托管的 Postgres 13 中安装 pg_cron 扩展

[英]How do I install the pg_cron extension in Postgres 13 hosted in my Windows 10

I see a few guides for installing the pg_cron extension in windows, but its very confusing.我看到一些在 Windows 中安装 pg_cron 扩展的指南,但它非常令人困惑。 Is there any guide that can help?是否有任何指南可以提供帮助? A simple create extension in the database doesnt work.数据库中的简单创建扩展不起作用。 I get the below error :我收到以下错误:

ERROR:  could not open extension control file "C:/Program Files/PostgreSQL/13/share/extension/pg_cron.control": No such file or directory
SQL state: 58P01

You have to install the extension first.您必须先安装扩展程序。

Since you are using Windows, things will get complicated.由于您使用的是 Windows,事情会变得复杂。 You need a C compiler and build instructions from source.您需要一个 C 编译器并从源代码构建指令。 There are no such build instructions available, but somebody has managed to do it before and suggested modifications that were never merged.没有可用的此类构建说明,但之前有人设法做到了,并提出了从未合并的修改建议

Based on this and my personal experience with pg_cron bugs, I have the feeling that Microsoft doesn't care for this project very much, and that you will have a hard time getting it to run on Windows.基于这一点和我对 pg_cron 错误的个人经验,我觉得微软不太关心这个项目,而且你很难让它在 Windows 上运行。

Alternatively, you could try your luck with pg_timetable , but you'd have to build that from source too.或者,您可以使用pg_timetable试试运气,但您也必须从源代码构建它

You might end up using pgAgent , for which pre-built Windows binaries exist.您可能最终会使用pgAgent ,其中存在预构建的 Windows 二进制文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM