IS_OUTER_JOIN是啥?
发布日期:2021-06-29 18:53:20 浏览次数:2 分类:技术文章

本文共 1052 字,大约阅读时间需要 3 分钟。

IS_OUTER_JOIN是啥?

/* * OUTER joins are those for which pushed-down quals must behave differently * from the join's own quals.  This is in fact everything except INNER and * SEMI joins.  However, this macro must also exclude the JOIN_UNIQUE symbols * since those are temporary proxies for what will eventually be an INNER * join. * * Note: semijoins are a hybrid case, but we choose to treat them as not * being outer joins.  This is okay principally because the SQL syntax makes * it impossible to have a pushed-down qual that refers to the inner relation * of a semijoin; so there is no strong need to distinguish join quals from * pushed-down quals.  This is convenient because for almost all purposes, * quals attached to a semijoin can be treated the same as innerjoin quals. */#define IS_OUTER_JOIN(jointype) \	(((1 << (jointype)) & \	  ((1 << JOIN_LEFT) | \	   (1 << JOIN_FULL) | \	   (1 << JOIN_RIGHT) | \	   (1 << JOIN_ANTI))) != 0)
  • 怎样判断jointype是否是等于1,2,3,4中的之一呢?
    • 分别是2,4,8,32,先求|,得一结果
    • 也就是(1 << (jointype)和上面结果相&
    • 如果不为零,那么说明jointype必然是等于1,2,3,4中之一

转载地址:https://cyj666.blog.csdn.net/article/details/108339577 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:free命令详解 +LoadAverage(负载)
下一篇:2020年-8月31日的安装pgsql数据库

发表评论

最新留言

网站不错 人气很旺了 加油
[***.192.178.218]2024年04月27日 20时32分49秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章