Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql Amazon Redshift:如何将字符串中每个字符的十六进制代码点转移到每一行?_Postgresql_Amazon Redshift - Fatal编程技术网

Postgresql Amazon Redshift:如何将字符串中每个字符的十六进制代码点转移到每一行?

Postgresql Amazon Redshift:如何将字符串中每个字符的十六进制代码点转移到每一行?,postgresql,amazon-redshift,Postgresql,Amazon Redshift,我想获取每个字符的代码点,以检查字符串是否包含任何代码点大于0xFFFF的字符。 例如,我有一个字符串“BIGBANG”。我想得到如下结果: to_hex ------ 42 -- B 49 -- I 47 -- G 42 -- B 41 -- A 4e -- N 47 -- G 在Postgres 9.x中,我可以简单地运行以下查询: SELECT TO_HEX(ASCII(REGEXP_SPLIT_TO_TABLE('B

我想获取每个字符的代码点,以检查字符串是否包含任何代码点大于0xFFFF的字符。

例如,我有一个字符串“BIGBANG”。我想得到如下结果:

to_hex
------
    42  -- B
    49  -- I
    47  -- G
    42  -- B
    41  -- A
    4e  -- N
    47  -- G
在Postgres 9.x中,我可以简单地运行以下查询:

SELECT TO_HEX(ASCII(REGEXP_SPLIT_TO_TABLE('BIGBANG', '')));
但红移不支持ASCII和REGEXP_SPLIT_TO_TABLE函数。
我应该如何在红移中获得相同的结果