项目作者: adjust

项目描述 :
triple bool for postgres
高级语言: C
项目地址: git://github.com/adjust/ajbool.git
创建时间: 2016-10-17T08:15:49Z
项目社区:https://github.com/adjust/ajbool

开源协议:

下载


CI

ajbool

A special boolean type that allows ‘unknown’ state without beeing NULL.
The intent is to allow a triple boolean value that can be used as PRIMARY key.
Expected intput is ‘t’, ‘f’, ‘u’ for true, false and unknown.
Note ajbool can still be set to NULL if needed.

usage

Typecast

  1. SELECT true::ajbool, false::ajbool, NULL::bool::ajbool;
  2. ajbool | ajbool | ajbool
  3. --------+--------+--------
  4. t | f | u
  5. (1 row)
  6. SELECT 't'::ajbool::bool, 'f'::ajbool::bool, 'u'::ajbool::bool;
  7. bool | bool | bool
  8. ------+------+------
  9. t | f | NULL

Parallelism Support

PostgreSQL 9.6 introduced parallelism safety markings for functions.
The ajbool-00.0.1—0.0.2.sql in the extensions directory makrs these
as safe. You should run this file after upgrading PostgreSQL.