惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
Webroot Blog
Webroot Blog
T
Troy Hunt's Blog
S
Secure Thoughts
S
Security @ Cisco Blogs
S
Security Affairs
Forbes - Security
Forbes - Security
W
WeLiveSecurity
H
Hacker News: Front Page
T
Threatpost
Google Online Security Blog
Google Online Security Blog
S
Schneier on Security
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
www.infosecurity-magazine.com
www.infosecurity-magazine.com
博客园 - Franky
腾讯CDC
IT之家
IT之家
博客园 - 聂微东
L
LINUX DO - 最新话题
罗磊的独立博客
Hacker News - Newest:
Hacker News - Newest: "LLM"
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 三生石上(FineUI控件)
Hacker News: Ask HN
Hacker News: Ask HN
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
Cybersecurity and Infrastructure Security Agency CISA
C
CERT Recently Published Vulnerability Notes
Know Your Adversary
Know Your Adversary
V
Vulnerabilities – Threatpost
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
博客园_首页
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Cisco Talos Blog
Cisco Talos Blog
S
SegmentFault 最新的问题
酷 壳 – CoolShell
酷 壳 – CoolShell
Hugging Face - Blog
Hugging Face - Blog
L
LINUX DO - 热门话题
美团技术团队
G
GRAHAM CLULEY
T
The Exploit Database - CXSecurity.com
AI
AI
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Jina AI
Jina AI
Help Net Security
Help Net Security
N
News | PayPal Newsroom
月光博客
月光博客
Spread Privacy
Spread Privacy
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
N
News and Events Feed by Topic

PostgreSQL

五年过去了,结论有什么变化吗? 用了十几年的 MySQL 了,突然发现 PostgreSQL 可能更加适合我,大家怎么看? - V2EX postgresql 多进程改多线程 - V2EX 二键安装一个 postgresql 服务 - V2EX 通过 pg_roaringbitmap 优化标签查询的话,有没有必要做高频标签映射和结合普通复合索引? - V2EX PostgreSQL + TimescaleDB 方案不按主键索引走,有什么办法吗? - V2EX 看看大家现在用 pg 的最佳实践是怎么样的 - V2EX 用 PostgreSQL 存图片等 binary 有什么坑吗 - V2EX [求助] 在哪个网址能够下载 PostgresSQL 9.3.0 版本的 Windows 二进制安装包?官方/ftp/old/binary 里没有。 - V2EX [请教]pgvector 的性能问题 - V2EX 多笔记本离线 PostgreSQL 数据库同步问题: UUID vs 自增主键 - V2EX PostgreSQL 通过分 Database 做多租户可行吗? PostgreSQL 多租户的正确姿势 - V2EX Postgresql 放 K8S 里,大家目前都用的什么方案呢? - V2EX 2025 年 postgresql 有什么优秀的备份解决方案 - V2EX 有大神研究过 pg_resetwal 的原理吗,为什么会丢 user 表的数据 - V2EX 按照 stackoverflow 教程执行 pg_resetwal, postgresql 的数据库被清空了 - V2EX 求国内高性价比的 postgresql 服务,纳米项目 - V2EX 请教一个关于 PostgreSQL 连接被 Server 关闭的问题 - V2EX PostgreSQL 18 JSONB 增加能取代 MongoDB 吗? - V2EX PostgreSql Oracle 迁移 postgreSQL ,有什么经验分享 - V2EX 有什么权限管理最佳实践吗 - V2EX 请教 PostgreSQL 和 PostGIS 使用问题 - V2EX pg 的毫秒级时间戳转换 - V2EX 关于 PostgreSQL 中的 max_connections 和 pg_stat_activity 的疑惑 - V2EX 目前国内最高性价比的 postgresql 服务是? - V2EX 新手,请问 postgres 怎么配置 vacuum - V2EX 学习 PostgreSQL,有什么资料推荐? - V2EX Apache AGE 和 Neo4j 哪个更好? - V2EX 有没有像 Citus 那样方便分片的图数据库? - V2EX 怎样使用 C 语言访问 PostgreSQL 集群? 小系统 数据库 mysql 和 postgresql 比对 和 wordpress 数据库技术选型 PostgreSQL 没有 on update current_timestamp 感觉好麻烦 - V2EX 主从同步使用的端口号可以和数据库端口号不同吗? - V2EX 为什么有时 PostgreSQL 有时会表现得比较卡? - V2EX 第一次使用 PostgreSQL,连建表都不会,请教点经验 Java 有没有针对 PostgreSQL 好用一点的 ORM - V2EX 请教,有无简单易用的 PostgreSQL 表结构、数据的同步工具? - V2EX PostgreSQL 启动失败 - V2EX PostgreSQL 数据库 正常情况下指定了 locale=C 与 encoding=UTF8 (最简单) - V2EX 错误迁移 pgsql 导致日志报 warning,请问如何解决? - V2EX 从 Mongodb 到 PostgreSQL 的大迁移 有无 pg 的入门精进博客或者视频推荐 有什么不通过写脚本的方式,将 postgreSQL 的建表语句转换为 doris 的建表语句吗? - V2EX 新的 PostgreSQL 语言插件 PL/PRQL - V2EX 请教一个经典的 postgres 的 sql 怎么写 - V2EX 洗数据:如何将 Contact 和 ContactTag 多对多关联起来 Postgres 在中国还能起来么? - V2EX PostgreSQL 17 增加增量备份的功能 - V2EX
适配信创数据库的人的精神状态 be like - V2EX
woodfizky · 2026-01-13 · via PostgreSQL

适配过程中发现:如果某个 SQL 的查询条件是 some_col != '',那么返回的结果就会是空

于是做了如下简单实验: SQL

select
    case
        when ('1' != '') then '1'
        when ('1' = '') then '2'
        else 'else'
    end as result_1,
    ('1' = '')::bool as result_2,
    ('1' != '')::bool as result_3,
    ('1' != '' or '1' = '') as always_true_1,
    ('1' != '1' or '1' = '1') as always_true_2

result:

{
  "postgres": {
    "result_1": "2",
    "result_2": false,
    "result_3": true,
    "always_true_1": true,
    "always_true_2": true
  },
  "gaussdb": {
    "result_1": "else",
    "result_2": null,
    "result_3": null,
    "always_true_1": null,
    "always_true_2": true
  }
}

完全不明白为什么 gaussdb 的逻辑是这样的,如果有人知道可以告诉我一下吗?

第 1 条附言  ·  1 月 14 日

感谢各位纠错,postgres 的 result_1 应该是 1 。
DB 在内网,复制不方便,手敲敲错了,不好意思。