是否可以从Python运行PGROUTING功能PGR_NodeNetwork和PGR_Createtopology在PostgreSQL中创建拓扑?

发布于 2025-01-26 00:21:51 字数 296 浏览 3 评论 0原文

我成功地使用了PostgreSQL的出色扩展Prouting创建了一系列查询。现在,我正在尝试设置一个Python脚本,以从Python运行整个过程。我使用SQLalchemy库连接到PostgreSQL数据库。除了pgr_nodenetwork和pgr_createtopology,所有查询都很好。当我运行Python脚本时,它成功完成并提供了与PostgreSQL完全相同的所有消息。 pgr_nodenetwork应该创建一个新表,但不是创建。有什么不同的方法可以使这两个功能起作用?

更新:我注意到,在PGADMIN仪表板中,此交易状态是“交易中的空闲”

I successfully created a series of queries using PostgreSQL's great extension pgRouting. Now I'm trying to set up a python script to run the whole process from python. I connected to the PostgreSQL database using sqlalchemy library. All queries are working well except pgr_nodeNetwork and pgr_createTopology which are pgRouting functions. When I run the python script, it successfully finishes and gives all messages, exactly the same as PostgreSQL does. pgr_nodeNetwork should create a new table but it's not created. Is there any different way to make these two functions work?

Update: I noted that in pgAdmin dashboard for this transaction state is "idle in transaction"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文