Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z999L-0007GW-M0 for pgsql-jdbc@arkaria.postgresql.org; Sun, 28 Jun 2015 09:45:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Z999K-0000MY-RI for pgsql-jdbc@arkaria.postgresql.org; Sun, 28 Jun 2015 09:45:18 +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 1Z998O-0007eU-CT for pgsql-jdbc@postgresql.org; Sun, 28 Jun 2015 09:44:20 +0000 Received: from mail-wi0-f176.google.com ([209.85.212.176]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Z998M-0007Jh-0v for pgsql-jdbc@postgresql.org; Sun, 28 Jun 2015 09:44:19 +0000 Received: by wicgi11 with SMTP id gi11so48967472wic.0 for ; Sun, 28 Jun 2015 02:44:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Ws+FoEnXG6rhGigsGl7oRcn/bs6AE3qtADjdaxVuYEY=; b=PZgqFYch1glzmLDJeR9q0od+FFvdI7UooPcMlbEWfabl7N3S9L7IrKSWuMTD39YRP+ JtQkSMlRLDxZSMolt8UFm1SOcU6ZVnS2wwFpdC7bytFDHci7LUlREFaoFwwozLzRCMCi mTK51qdyR3vO9wiepW64eR99FkTifB10y+u0z1yyqNOJgc7wA3Rr+qTMMdF9dhOidvIx Wxuewq4F1UIydw/pqtkLB6TTEXNx+75RkCoTGSx5vqa2Q8nD/F1OANVtLrWD12YiXGjw OMvdYEtNyEeFSP8cSx5bcHjOYaS67cvfxi+ItbFrCo5NI+Rqwi9qr2QV4gxdhC1U7azk cmxg== X-Gm-Message-State: ALoCoQmsRTRdsma5LA3YBMdVMGoIAW9SWN4NdRlt/rYV5UIXDHe25chqxdy55mzP+2UfcSl1L2EQ X-Received: by 10.194.84.179 with SMTP id a19mr18341979wjz.29.1435484656568; Sun, 28 Jun 2015 02:44:16 -0700 (PDT) Received: from [192.168.43.95] ([31.4.238.29]) by mx.google.com with ESMTPSA id fa8sm6639718wib.14.2015.06.28.02.44.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 28 Jun 2015 02:44:15 -0700 (PDT) Message-ID: <558FC1ED.3000401@8Kdata.com> Date: Sun, 28 Jun 2015 11:44:13 +0200 From: =?ISO-8859-1?Q?=C1lvaro_Hern=E1ndez_Tortosa?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: SQLJSON 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> In-Reply-To: <002901d0b183$53e541b0$fbafc510$@eu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -0.3 (/) 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 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) means of getting JSON out of their database? So we make the "marketing" that 9.4 is all about jsonb and the NoSQL replacement yet you cannot do JSON with Java? Really? User's don't care about extreme performance. Users care about easy of use and decent set of features. Adding JSON support, even thought it's not the most performant one is something we should be doing as quickly as possible. Regards, Álvaro -- Álvaro Hernández Tortosa ----------- 8Kdata > > > -----Original Message----- > From: pgsql-jdbc-owner@postgresql.org > [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Álvaro Hernández > 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, > > Álvaro > > -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc