Changes between Version 14 and Version 15 of v6/pgsummary


Ignore:
Timestamp:
05/03/2012 11:18:38 AM (14 years ago)
Author:
lisiliang
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • v6/pgsummary

    v14 v15  
    8181select STRING_AGG (company_name, ',') from pp_ad group by brand_id ; 
    8282select STRING_AGG (distinct area_id::text, ',') from pp_ad group by brand_id ; 
     83 
     84pg 还是很能干的,果然找到了一个替代方案 
     851       cyp_app=> \df STRING_AGG 
     862                                   List of functions 
     873          Schema   |    Name    | Result data type | Argument data types | Type 
     884       ------------+------------+------------------+---------------------+------ 
     895        pg_catalog | string_agg | text             | text, text          | agg 
     906       (1 row) 
     91 
     92http://bbs.pconline.cn/topic-2159.html 
     93 
    8394}}} 
    8495 
     
    181192}}} 
    182193 
    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 }}}