id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	modified_flg
194	PostgreSQL8.3-beta で新着情報の SQL エラー	nanasess	adachi	"PostgreSQL8.3 では, 型制約が厳しくなったらしい.

新着情報画面で下記エラーが発生する

{{{
SELECT *, cast(substring(news_date,1,10) as date) as news_date_disp FROM dtb_news WHERE del_flg = '0' ORDER BY rank DESC
DB Error: unknown error

SELECT *, cast(substring(news_date,1,10) as date) as news_date_disp FROM dtb_news WHERE del_flg = '0' ORDER BY rank DESC [nativecode=ERROR:  function pg_catalog.substring(timestamp without time zone, integer, integer) does not exist
LINE 1: SELECT *, cast(substring(news_date,1,10) as date) as news_da...
                       ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.]
}}}

PostgreSQL は以下のパッチで修正可能.
{{{
Index: LC_Page_FrontParts_Bloc_News.php
===================================================================
--- LC_Page_FrontParts_Bloc_News.php	(リビジョン 16804)
+++ LC_Page_FrontParts_Bloc_News.php	(作業コピー)
@@ -97,7 +97,7 @@
 
     function lfGetNews(){
         $conn = new SC_DBConn();
-        $sql = ""SELECT *, cast(substring(news_date,1,10) as date) as news_date_disp FROM dtb_news WHERE del_flg = '0' ORDER BY rank DESC"";
+        $sql = ""SELECT *, cast(substring(news_date::text,1,10) as date) as news_date_disp FROM dtb_news WHERE del_flg = '0' ORDER BY rank DESC"";
         $list_data = $conn->getAll($sql);
         return $list_data;
     }

}}}

MySQL の場合, 上記修正をすると, おそらく構文エラーとなるため, 分岐させる必要があるかも.（未検証）"	バグ指摘	closed	中	EC-CUBE2.3.0	フロント	2.0系(正式版)	修正済			
