Ticket #22 (closed task 任务: fixed)
oracle 转pg wmsys wm_concat 的替代方案
| Reported by: | lisiliang | Owned by: | lisiliang |
|---|---|---|---|
| Priority: | major | Milestone: | PG 测试计划进程 |
| Component: | component1 | Version: | |
| Keywords: | Cc: | ||
| Due Date: | 03/05/2012 |
Description
oracle 数据库中比较常用到wmsys.wm_concat () 来连接字符串
把多行的数据库连接到一起(默认是用逗号分割的)
oracle 转pg 需要一个替代方案,尽量的应用代码改动小,
pg 还是很能干的,果然找到了一个替代方案
1 cyp_app=> \df STRING_AGG
2 List of functions
3 Schema | Name | Result data type | Argument data types | Type
4 ------------+------------+------------------+---------------------+------
5 pg_catalog | string_agg | text | text, text | agg
6 (1 row)
Change History
Note: See
TracTickets for help on using
tickets.
![(please configure the [header_logo] section in trac.ini)](http://www1.pconline.com.cn/hr/2009/global/images/logo.gif)