You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Gianni Bruno (JIRA)" <ji...@apache.org> on 2008/09/12 18:23:44 UTC
[jira] Created: (OPENJPA-723) Feature request for PostgreSQL XML
Column Mapping
Feature request for PostgreSQL XML Column Mapping
-------------------------------------------------
Key: OPENJPA-723
URL: https://issues.apache.org/jira/browse/OPENJPA-723
Project: OpenJPA
Issue Type: New Feature
Components: sql
Reporter: Gianni Bruno
PostgreSQL 8.3 has an xml data type it would be great if this was supported in the same manner as DB2, Oracle and SQLServer for XML Column Mapping.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-723) Feature request for PostgreSQL XML
Column Mapping
Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Milosz Tylenda resolved OPENJPA-723.
------------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
1.3.0
The patch applied to trunk and 1.3.x branch. Made also an update for the manual.
> Feature request for PostgreSQL XML Column Mapping
> -------------------------------------------------
>
> Key: OPENJPA-723
> URL: https://issues.apache.org/jira/browse/OPENJPA-723
> Project: OpenJPA
> Issue Type: New Feature
> Components: sql
> Reporter: Gianni Bruno
> Assignee: Milosz Tylenda
> Fix For: 1.3.0, 2.0.0
>
> Attachments: OPENJPA-723.patch
>
>
> PostgreSQL 8.3 has an xml data type it would be great if this was supported in the same manner as DB2, Oracle and SQLServer for XML Column Mapping.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-723) Feature request for PostgreSQL XML
Column Mapping
Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Milosz Tylenda updated OPENJPA-723:
-----------------------------------
Attachment: OPENJPA-723.patch
1. The attached patch provides XML column support for PostgreSQL. All changes
are in the PostgresDictionary class.
2. Required PostgreSQL version: 8.3 or later, with XML support compiled-in.
3. Required JDBC driver version: 8.3-603 (2008-01-31) or later.
4. xpath PostgreSQL function and cast are used to do XML comparisons.
Sample queries generated by the patched code:
SELECT t0.oid, t1.oid FROM TORDER t0 CROSS JOIN TORDER t1 WHERE (CAST((xpath('/*/City/text()',t0.shipAddress))[1] AS VARCHAR) = CAST((xpath('/*/City/text()',t1.shipAddress))[1] AS VARCHAR)) ORDER BY t0.oid ASC
SELECT t0.oid, t0.version, t0.amount, t0.CUSTOMER_COUNTRYCODE, t0.CUSTOMER_ID, t0.delivered, t0.shipAddress FROM TORDER t0 CROSS JOIN TCUSTOMER t1 WHERE (CAST((xpath('/*/City/text()',t0.shipAddress))[1] AS VARCHAR) = t1.city)
5. connectedConfiguration method is used to determine whether XML column is
supported in the database.
6. setClobString and setNull methods have been overridden/modified as PostgreSQL
requires special care here when dealing with XML column.
7. I removed the line
varcharTypeName = "VARCHAR{0}";
Now varcharTypeName defaults to "VARCHAR". The reason is it was causing
incorrect SQL when using appendCast method. I could not figure out why
was varcharTypeName set to "VARCHAR{0}" instead of just "VARCHAR". Does
anybody have a clue? The change did not affect the persistence-jdbc test suite
when run on PostgreSQL. Let me know if this change is not desired.
8. I will provide an improved test case for XML column mapping shortly.
9. If the patch is going to be accepted, I will provide an update for the
manual too.
10. I welcome comments and suggestions.
> Feature request for PostgreSQL XML Column Mapping
> -------------------------------------------------
>
> Key: OPENJPA-723
> URL: https://issues.apache.org/jira/browse/OPENJPA-723
> Project: OpenJPA
> Issue Type: New Feature
> Components: sql
> Reporter: Gianni Bruno
> Attachments: OPENJPA-723.patch
>
>
> PostgreSQL 8.3 has an xml data type it would be great if this was supported in the same manner as DB2, Oracle and SQLServer for XML Column Mapping.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (OPENJPA-723) Feature request for PostgreSQL XML
Column Mapping
Posted by "Milosz Tylenda (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Milosz Tylenda reassigned OPENJPA-723:
--------------------------------------
Assignee: Milosz Tylenda
> Feature request for PostgreSQL XML Column Mapping
> -------------------------------------------------
>
> Key: OPENJPA-723
> URL: https://issues.apache.org/jira/browse/OPENJPA-723
> Project: OpenJPA
> Issue Type: New Feature
> Components: sql
> Reporter: Gianni Bruno
> Assignee: Milosz Tylenda
> Attachments: OPENJPA-723.patch
>
>
> PostgreSQL 8.3 has an xml data type it would be great if this was supported in the same manner as DB2, Oracle and SQLServer for XML Column Mapping.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.