Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z99FM-0007Rp-Cu for pgsql-jdbc@arkaria.postgresql.org; Sun, 28 Jun 2015 09:51:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Z99FL-0002CY-Mn for pgsql-jdbc@arkaria.postgresql.org; Sun, 28 Jun 2015 09:51:31 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Z99FK-0002CE-Mf for pgsql-jdbc@postgresql.org; Sun, 28 Jun 2015 09:51:30 +0000 Received: from smtprelay05.ispgateway.de ([80.67.31.99]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Z99FH-0007Vw-Jn for pgsql-jdbc@postgresql.org; Sun, 28 Jun 2015 09:51:29 +0000 Received: from [88.66.20.172] (helo=Zauselmaus) by smtprelay05.ispgateway.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.84) (envelope-from ) id 1Z99FF-0003oI-Ch for pgsql-jdbc@postgresql.org; Sun, 28 Jun 2015 11:51:25 +0200 From: "Markus KARG" To: References: <558ED5A6.4070500@8Kdata.com> <002701d0b104$114cdd60$33e69820$@eu> <558F15C7.5060309@8Kdata.com> <001a01d0b126$1ab09c80$5011d580$@eu> <558F214A.2090802@8Kdata.com> <002901d0b183$53e541b0$fbafc510$@eu> <558FC1ED.3000401@8Kdata.com> In-Reply-To: <558FC1ED.3000401@8Kdata.com> Subject: Re: SQLJSON Date: Sun, 28 Jun 2015 11:51:23 +0200 Organization: Markus KARG, Staatl. gepr. Inf. Message-ID: <001401d0b187$fe63d080$fb2b7180$@eu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdCxhyOdPtj+NYgYQP2RuOJQCRZfawAAJa3w Content-Language: de X-AVK-Virus-Check: AVA 25.2250;789163EA X-AVK-Spam-Check: 1; str=0001.0A0C0201.558FC39C.00F7,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0; F1206 X-Df-Sender: bWFya3VzQGhlYWRjcmFzaGluZy5ldQ== X-Pg-Spam-Score: -1.1 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org It is not *us* who let the JSON users down, it is the PostgreSQL protocol guys who did not add any useful support for JSON. A driver is not a compensation for missing product features, it is just a thin wrapper around the base product's features. I mean, what happens if the application shall work with a different product? If you rely on non-JDBC-features, you're screwed. So a profession application using JSON should ALWAYS come with JSR 253 anyways. -----Original Message----- From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of =C1lvaro Hern=E1ndez Tortosa Sent: Sonntag, 28. Juni 2015 11:44 To: pgsql-jdbc@postgresql.org Subject: Re: [JDBC] SQLJSON On 28/06/15 11:17, Markus KARG wrote: > I do not see the benefit of that effort, as getting JSON as a LONG VARCHAR > and then parsing it on behalf of the application is pretty simple and > straightforward. My vote would be to not do anything until JDBC 4.3 of JDBC > 5.0 provides a standard API for dealing with JSON inside of the driver or at > least PostgreSQL 9.5 or PostgreSQL 10 provides a streaming protocol for JSON > and / or XML. Don't do anything? And let Java PostgreSQL users down, without a (driver, supported)=20 means of getting JSON out of their database? So we make the "marketing"=20 that 9.4 is all about jsonb and the NoSQL replacement yet you cannot do=20 JSON with Java? Really? User's don't care about extreme performance. Users care about easy=20 of use and decent set of features. Adding JSON support, even thought=20 it's not the most performant one is something we should be doing as=20 quickly as possible. Regards, =C1lvaro --=20 =C1lvaro Hern=E1ndez Tortosa ----------- 8Kdata > > > -----Original Message----- > From: pgsql-jdbc-owner@postgresql.org > [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of =C1lvaro Hern=E1ndez > Tortosa > Sent: Sonntag, 28. Juni 2015 00:19 > To: pgsql-jdbc@postgresql.org > Subject: Re: [JDBC] SQLJSON > > > > On 28/06/15 00:10, Markus KARG wrote: >> (1) I have no problem with providing a JSON Object. I just want to point > out >> that it cannot be the final solution from the point of a USER as it > implies >> horrible performance drawbacks. > Those performance problems are inevitable as of today. Unless you > change PostgreSQL's protocol (and you will have me by your side on that > one) there's nothing we can do. So with the current status quo, there's > nothing else to do. And so the best we can do (today) is provide that > JsonObject. > >> (2) A default parser bundled with pgjdbc simply makes no sense as (a) in a >> Java EE environment a JSONP API provider IS found on the classpath > already, > We may provide classloading mechanism to opt-out or different > packaging alternatives (a JDBC driver for EE and one for standalone). > There may be more alternatives. But not providing one is making our > user's life more complicated. > >> and (b) it is not unlikely that the same will be the case for Java SE 9 > due >> to the implied importance of JSON these days, > Java9 is far and away. And it will change the way dynamic code > loading happens. I'm all in to refactor the driver for Java9 and take > advantage of modules, and that surely helps here, but we need to look > now at the present. > >> and (c) an application >> programmer dealing with JSON has to have a JSON parser anyways, even if he >> does not use JDBC at all. > That I don't agree with. You may store data in json format in > PostgreSQL and then convert to your domain objects which may or may not > use JSON. So we cannot assume the user already has a JSON parser. > > The best we can do is that the JDBC driver works by default, rather > than throwing an exception because there is no JSON parser loaded. We > have to make it easy for the users. > > Best, > > =C1lvaro > > --=20 Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc --=20 Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc