| | 182 | |
| | 183 | * oracle wm_concat 函数的替代方案 |
| | 184 | {{{ |
| | 185 | oracle 数据库中比较常用到wmsys.wm_concat () 来连接字符串 |
| | 186 | |
| | 187 | 把多行的数据库连接到一起(默认是用逗号分割的) |
| | 188 | |
| | 189 | oracle 转pg 需要一个替代方案,尽量的应用代码改动小, |
| | 190 | |
| | 191 | pg 还是很能干的,果然找到了一个替代方案 |
| | 192 | 1 cyp_app=> \df STRING_AGG |
| | 193 | 2 List of functions |
| | 194 | 3 Schema | Name | Result data type | Argument data types | Type |
| | 195 | 4 ------------+------------+------------------+---------------------+------ |
| | 196 | 5 pg_catalog | string_agg | text | text, text | agg |
| | 197 | 6 (1 row) |
| | 198 | |
| | 199 | http://bbs.pconline.cn/topic-2159.html |
| | 200 | |
| | 201 | }}} |