PostgreSQL - 非空且非空字符串的空值
PostgreSQL - empty values that are not null and not empty strings
我 运行 在 PostgreSQL 上进行此查询 table:
select * wkt from table where column <>'' and column is not null
..并意外收到几行,该列中没有可见值。为什么是这样?那些行的该列中是否有一些 'hidden' 值,或损坏的 table,或其他东西?
t=# select ascii(chr(9));
ascii
-------
9
(1 row)
因此
select ascii(column) from table where column <>'' and column is not null
应该给出思路
https://www.postgresql.org/docs/current/static/functions-string.html
ASCII code of the first character of the argument. For UTF8 returns
the Unicode code point of the character. For other multibyte
encodings, the argument must be an ASCII character.
我 运行 在 PostgreSQL 上进行此查询 table:
select * wkt from table where column <>'' and column is not null
..并意外收到几行,该列中没有可见值。为什么是这样?那些行的该列中是否有一些 'hidden' 值,或损坏的 table,或其他东西?
t=# select ascii(chr(9));
ascii
-------
9
(1 row)
因此
select ascii(column) from table where column <>'' and column is not null
应该给出思路
https://www.postgresql.org/docs/current/static/functions-string.html
ASCII code of the first character of the argument. For UTF8 returns the Unicode code point of the character. For other multibyte encodings, the argument must be an ASCII character.