-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
尝试修复 PostgreSQL 兼容性问题 #54
Conversation
index.php
Outdated
$pageSize = $this->options->pageSize; | ||
$select1 = $this->select()->where('type = ?', 'post'); | ||
$select2 = $this->select()->where('type = ? && status = ? && created < ?', 'post', 'publish', time()); | ||
if ('Pgsql' == $type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
其实 Mysql 的 && 也是 AND,所以都改成 AND 应该就行了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗷嗷,这里我重新改了一下
咱还需要康康其他用到数据库的地方是否需要修改噢 |
emmm 我瞅了瞅其他部分的代码,看起来没有啥问题欸。还测试了一下之前没用到的功能,暂时没有发现 bug 。 小心附上我的博客~ |
咱的 docker 安装 PostgreSQL 连接 Typecho 有点问题,可能需要你看下这些模块有没有问题力! 谢谢力! |
PostgreSQL 默认只允许本地连接来,可能要配置一下 php 模块的话,装个 php-pgsql 就行~ (如果是 Debian 系) 后台备份功能测试了一下用起来没问题吼;黄色小闪电图标因为 |
OK!可以啦!感谢 PR ~ |
Typecho 同时兼容 PostgreSQL ,但是配合该主题会出现 500 数据库错误的问题。
尝试修复之,并在最新的 Typecho v1.2.0 和 PostgreSQL 13 与 PostgreSQL 14 测试正常。
另外还写了 Links 插件可用的
Pgsql.sql
,并不知道在哪里提 PR ,所以也附在这里。 https://gist.github.com/weilinfox/48f6ea365a8692b8da7fab890b7208f0感谢~