Re: Fw: mapping java objects with postgresql types

From: Kevin Wooten <kdubb(at)me(dot)com>
To: Oussema Benjemaa <ousema2003(at)yahoo(dot)fr>
Cc: Andreas Joseph Krogh <andreas(at)visena(dot)com>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Fw: mapping java objects with postgresql types
Date: 2015-01-23 16:12:27
Message-ID: 8A3CE9A8-6E24-46D6-880F-CE07F792BD99@me.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Also the driver does provide a tool pgjdbc-ng-udt <https://github.com/impossibl/pgjdbc-ng-udt> for generating the Java UDT code; which is suggested by the JDBC docs. Although, I believe most people find this route overkill if they are dealing with just a few small types.

> On Jan 23, 2015, at 9:08 AM, Kevin Wooten <kdubb(at)me(dot)com> wrote:
>
> The biggest failing of the implementation at this point is its documentation. Rest assured though, it is JDBC 4.1 compliant. So the JDBC documentation regarding UDTs (using SQLOutput, SQLInput, etc) applies directly.
>
>> On Jan 23, 2015, at 7:36 AM, Oussema Benjemaa <ousema2003(at)yahoo(dot)fr <mailto:ousema2003(at)yahoo(dot)fr>> wrote:
>>
>> i downloaded this JAR pgjdbc-ng-0.3-complete.jar ...
>> i'm asking if there is exemple for mapping java objects to postgresql ... with this api
>>
>>
>>
>> Oussema Benjemaa
>> Sr Oracle DBA / Trading Software Development
>> SunGard Financial Systems, Tunis
>> E-mail : ousema2003(at)yahoo(dot)fr <mailto:ousema2003(at)yahoo(dot)fr>
>> Mobile : 0021622800497
>>
>>
>> On Thursday, 22 January 2015, 13:14, Andreas Joseph Krogh <andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>> wrote:
>>
>>
>> På torsdag 22. januar 2015 kl. 17:00:25, skrev Oussema Benjemaa <ousema2003(at)yahoo(dot)fr <mailto:ousema2003(at)yahoo(dot)fr>>:
>>
>> Hi,
>>
>> I want to pass array of complex type from java into plpgsql function
>>
>> I already tried using JDBC Array and Struct types, but postgresql jdbc driver doesn't implement Struct yet so we weren't able to get thinks work
>>
>> (in addition of the fact that. (Connection.createStruct is not implemented in postgres JDBC)
>>
>> and actually as solution , i'm using PGObject to push the data to the database with some diffuclts with the syntax and this is mainly for types composites having bytea datatype ..
>>
>> but finally i succeded to push data to the database with the usage of the text representation of the array of the type composite .
>>
>> But i'm strongly , looking for an alternative of the PGObject , to avoid passing complex structures (array of types) from jdbc with text representation.
>>
>>
>> ALso i didn't found documentation for passing such as complex structures including the the rules for text representation of nested types .
>>
>> Could you please advice ...
>>
>> Oussema BenJemaa
>> Senior DBA
>>
>> Try https://github.com/impossibl/pgjdbc-ng <https://github.com/impossibl/pgjdbc-ng>
>>
>> --
>> Andreas Joseph Krogh
>> CTO / Partner - Visena AS
>> Mobile: +47 909 56 963
>> andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
>> www.visena.com <https://www.visena.com/>
>> <Mail Attachment.png> <https://www.visena.com/>
>>
>>
>>
>> <Mail Attachment.png>
>> --
>> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org <mailto:pgsql-jdbc(at)postgresql(dot)org>)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-jdbc <http://www.postgresql.org/mailpref/pgsql-jdbc>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Pawel Veselov 2015-01-26 22:06:27 getting async raise notice messages
Previous Message Kevin Wooten 2015-01-23 16:08:05 Re: Fw: mapping java objects with postgresql types