Ticket #22 (closed task 任务: fixed)

Opened 14 years ago

Last modified 14 years ago

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)

 http://bbs.pconline.cn/topic-2159.html

Change History

comment:1 Changed 14 years ago by lisiliang

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.