is SQLXML implemented somewhere?

Поиск
Список
Период
Сортировка
Искать

is SQLXML implemented somewhere?

От:
boris <boris@localhost.localdomain>
Дата:
hi all,
I'm trying to use SQLXML ( con.createSQLXML();) with 8.4-703 jdbc4 and 
I'm getting this :
Method org.postgresql.jdbc4.Jdbc4Connection.createSQLXML() is not yet 
implemented.

how do I insert xml data type using jdbc in postgre?
thanks.

Re: is SQLXML implemented somewhere?

От:
Dave Cramer <pg@fastcrypt.com>
Дата:
Hi Boris,

It would appear that it is not supported yet.

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca




On Fri, Sep 16, 2011 at 7:29 PM, boris  wrote:
> hi all,
> I'm trying to use SQLXML ( con.createSQLXML();) with 8.4-703 jdbc4 and I'm
> getting this :
> Method org.postgresql.jdbc4.Jdbc4Connection.createSQLXML() is not yet
> implemented.
>
> how do I insert xml data type using jdbc in postgre?
> thanks.
>
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>

Re: is SQLXML implemented somewhere?

От:
Kris Jurka <books@ejurka.com>
Дата:


On Fri, 16 Sep 2011, boris wrote:

> I'm trying to use SQLXML ( con.createSQLXML();) with 8.4-703 jdbc4 and I'm
> getting this :
> Method org.postgresql.jdbc4.Jdbc4Connection.createSQLXML() is not yet
> implemented.

Are you sure you have 8.4-703?  That version should have SQLXML support. 
It was added for the 8.4 release.

Kris Jurka

Re: is SQLXML implemented somewhere?

От:
boris <boris@localhost.localdomain>
Дата:
On 09/17/2011 09:25 PM, Kris Jurka wrote:
>
>
> On Fri, 16 Sep 2011, boris wrote:
>
>> I'm trying to use SQLXML ( con.createSQLXML();) with 8.4-703 jdbc4 and I'm
>> getting this :
>> Method org.postgresql.jdbc4.Jdbc4Connection.createSQLXML() is not yet
>> implemented.
>
> Are you sure you have 8.4-703?  That version should have SQLXML support.
> It was added for the 8.4 release.
>
> Kris Jurka
>

Kris,
you are right. Looks like old jars were still in classpath somehow.
It's working now.

Still, I can't get values using sql. I posted another message to 
pgsql.sql...

Thanks!



Re: is SQLXML implemented somewhere?

От:
boris <boris@localhost.localdomain>
Дата:
On 09/17/2011 09:25 PM, Kris Jurka wrote:
>
>
> On Fri, 16 Sep 2011, boris wrote:
>
>> I'm trying to use SQLXML ( con.createSQLXML();) with 8.4-703 jdbc4 and I'm
>> getting this :
>> Method org.postgresql.jdbc4.Jdbc4Connection.createSQLXML() is not yet
>> implemented.
>
> Are you sure you have 8.4-703?  That version should have SQLXML support.
> It was added for the 8.4 release.
>
> Kris Jurka
>


btw, what is the preferred way to work with xml data type, if there is one.?
PGobject or SQLXML ? Is there a difference from performance point of 
view or any other?
thanks.

OpenJPA problems running against PG 8.1

От:
Andrew Hastie <andrew@ahastie.net>
Дата:
Posting here for info only as I don't believe this is a "bug" as such, 
rather a change in behaviour:-

Latest 2.1.1 stable version of Apache OpenJPA project appears broken 
when running against Postgres when upgraded to v9.1. This I think is 
down to the changes in escape string handling in SQL LIKE clauses. 
Here's a link to the bug I've lodged against OpenJPA which includes 
details of how to configure an override at runtime to the default 
Postgres DBDictionary setting which will get things working again:-

   
http://openjpa.208410.n2.nabble.com/Postgres-V9-1-issue-with-LIKE-clause-and-Escape-Strings-td6848069.html

Also copying here for info just in case:-

=======================================================
Noticed an issue with the Postgres DBDictionary definition after
updating Postgres from version 8.4 to 9.1:-

Here's what you get in the Postgres trace file when executing some JPA
driven queries where an SQL LIKE is involved:-

2011-09-30 14:29:41 BST ERROR:  invalid escape string
2011-09-30 14:29:41 BST HINT:  Escape string must be empty or one 
character.
2011-09-30 14:29:41 BST STATEMENT:  SELECT t0.id, t0.identificationMask,
t0.productName FROM DBTYPE t0 WHERE (t0.identificationMask LIKE $1
ESCAPE '\\')
2011-09-30 14:29:41 BST ERROR:  current transaction is aborted, commands
ignored until end of transaction block

This appears to be down to a change the Postgres project have made to
escape string handling:-
http://www.postgresql.org/docs/9.1/static/release-9-1.html (see
section E.2.2.1)

You appear to be able to override the default DBDictionary setting for
this as follows to get things working again:-


So, does this mean OpenJPA needs a version dependent dictionary
definition for Postgres from now on? Anybody got any better solutions or
care to confirm what I'm seeing?

I've also posted this to the Postgres JDBC mailing list in case they
have any comments.
=======================================================

Andrew

Re: OpenJPA problems running against PG 8.1

От:
Andrew Hastie <andrew@ahastie.net>
Дата:
Apologies - posted under wrong thread. Will re-post. (Monday morning 
syndrome :-/ )
Andrew

On 03/10/11 10:31, Andrew Hastie wrote:
> Posting here for info only as I don't believe this is a "bug" as such, 
> rather a change in behaviour:-
>
> Latest 2.1.1 stable version of Apache OpenJPA project appears broken 
> when running against Postgres when upgraded to v9.1. This I think is 
> down to the changes in escape string handling in SQL LIKE clauses. 
> Here's a link to the bug I've lodged against OpenJPA which includes 
> details of how to configure an override at runtime to the default 
> Postgres DBDictionary setting which will get things working again:-
>
>   
> http://openjpa.208410.n2.nabble.com/Postgres-V9-1-issue-with-LIKE-clause-and-Escape-Strings-td6848069.html
>
> Also copying here for info just in case:-
>
> =======================================================
> Noticed an issue with the Postgres DBDictionary definition after
> updating Postgres from version 8.4 to 9.1:-
>
> Here's what you get in the Postgres trace file when executing some JPA
> driven queries where an SQL LIKE is involved:-
>
> 2011-09-30 14:29:41 BST ERROR:  invalid escape string
> 2011-09-30 14:29:41 BST HINT:  Escape string must be empty or one 
> character.
> 2011-09-30 14:29:41 BST STATEMENT:  SELECT t0.id, t0.identificationMask,
> t0.productName FROM DBTYPE t0 WHERE (t0.identificationMask LIKE $1
> ESCAPE '\\')
> 2011-09-30 14:29:41 BST ERROR:  current transaction is aborted, commands
> ignored until end of transaction block
>
> This appears to be down to a change the Postgres project have made to
> escape string handling:-
> http://www.postgresql.org/docs/9.1/static/release-9-1.html (see
> section E.2.2.1)
>
> You appear to be able to override the default DBDictionary setting for
> this as follows to get things working again:-
>  value="postgres(SearchStringEscape=\)"/>
>
> So, does this mean OpenJPA needs a version dependent dictionary
> definition for Postgres from now on? Anybody got any better solutions or
> care to confirm what I'm seeing?
>
> I've also posted this to the Postgres JDBC mailing list in case they
> have any comments.
> =======================================================
>
> Andrew
>

Re: OpenJPA problems running against PG 8.1

От:
Oliver Jowett <oliver@opencloud.com>
Дата:
On 3 October 2011 22:31, Andrew Hastie  wrote:

> 2011-09-30 14:29:41 BST ERROR:  invalid escape string
> 2011-09-30 14:29:41 BST HINT:  Escape string must be empty or one character.
> 2011-09-30 14:29:41 BST STATEMENT:  SELECT t0.id, t0.identificationMask,
> t0.productName FROM DBTYPE t0 WHERE (t0.identificationMask LIKE $1
> ESCAPE '\\')
> 2011-09-30 14:29:41 BST ERROR:  current transaction is aborted, commands
> ignored until end of transaction block

> So, does this mean OpenJPA needs a version dependent dictionary
> definition for Postgres from now on? Anybody got any better solutions or
> care to confirm what I'm seeing?

If you use E''-style strings it will be less version-dependent - that
syntax was added a while back (in 8.1?)

Oliver
FAQ