|
From: Dain S. <dsu...@us...> - 2002-06-06 05:20:02
|
User: dsundstrom
Date: 02/06/05 22:20:01
Modified: src/etc/conf/default Tag: Branch_3_0
standardjbosscmp-jdbc.xml
Log:
Fixed PostgreSQL locate function mapping. The old version would return 0
if any of the parameters were null. The spec says that the function should
return null if any of the arguments are null.
Revision Changes Path
No revision
No revision
1.23.2.7 +3 -3 jboss/src/etc/conf/default/standardjbosscmp-jdbc.xml
Index: standardjbosscmp-jdbc.xml
===================================================================
RCS file: /cvsroot/jboss/jboss/src/etc/conf/default/standardjbosscmp-jdbc.xml,v
retrieving revision 1.23.2.6
retrieving revision 1.23.2.7
diff -u -r1.23.2.6 -r1.23.2.7
--- standardjbosscmp-jdbc.xml 6 Jun 2002 03:46:35 -0000 1.23.2.6
+++ standardjbosscmp-jdbc.xml 6 Jun 2002 05:20:00 -0000 1.23.2.7
@@ -669,7 +669,7 @@
</function-mapping>
<function-mapping>
<function-name>locate</function-name>
- <function-sql>(coalesce(nullif(position(?1 in substring(?2 from ?3)), 0) + ?3 -1, 0)) </function-sql>
+ <function-sql>(CASE position(?1 in substring(?2 from ?3)) WHEN 0 THEN 0 ELSE position(?1 in substring(?2 from ?3)) + ?3 - 1 END)</function-sql>
</function-mapping>
<function-mapping>
<function-name>abs</function-name>
@@ -788,7 +788,7 @@
</function-mapping>
<function-mapping>
<function-name>locate</function-name>
- <function-sql>(coalesce(nullif(position(?1 in substring(?2 from ?3)), 0) + ?3 -1, 0)) </function-sql>
+ <function-sql>(CASE position(?1 in substring(?2 from ?3)) WHEN 0 THEN 0 ELSE position(?1 in substring(?2 from ?3)) + ?3 - 1 END)</function-sql>
</function-mapping>
<function-mapping>
<function-name>abs</function-name>
|