Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z9Iuz-0001RJ-MW for pgsql-jdbc@arkaria.postgresql.org; Sun, 28 Jun 2015 20:11:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Z9Iuy-0008BL-S2 for pgsql-jdbc@arkaria.postgresql.org; Sun, 28 Jun 2015 20:11:08 +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 1Z9Iux-0008B0-6W for pgsql-jdbc@postgresql.org; Sun, 28 Jun 2015 20:11:07 +0000 Received: from mail-wg0-f52.google.com ([74.125.82.52]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Z9Iut-0002OY-VD for pgsql-jdbc@postgresql.org; Sun, 28 Jun 2015 20:11:05 +0000 Received: by wguu7 with SMTP id u7so125549518wgu.3 for ; Sun, 28 Jun 2015 13:11:02 -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 :cc:subject:references:in-reply-to:content-type; bh=GpbQjxx9FeK96Ct2NROW4uZQsGIOLyNcDPMQGtSr918=; b=kiy41M90yWL9mVN8J6u5Ko39wSufDZz99S/HR1DA0fEJHvWV9ujFsdSNwuGRyDx2RE 9C+E6ZpqUZ3wO0u0smo6uFz7Bh2SlpgA2vrx3kyphoWo3fwwQ2hn6Tf05iaIgQufAa+2 VG0dMdkvvd/Ko2XagwTf5Ar48gadwVSWoKtsC6u7GdPHQgZuWQBow4z9JEZrXYfwUZBV nqoV6A9veykpsM7JoxmcEiQJzGMeg2uc+0720xF/VSZzBnu80m2Z+xbP+lZq96SH7qrI t3EgBpW4i1lX1HvJgVnSDzcOWir0gINYT/9c/FXvTAp6hORFtYxTnftPVDJAdAipwILB Bu8g== X-Gm-Message-State: ALoCoQlNFM5kED83bYkOmg6kjuoGczq4k4Tgx0i/ltWmXbBk9LUqZZsKCWGTjz3alcC3QazizGMM X-Received: by 10.194.94.101 with SMTP id db5mr21881313wjb.91.1435522262517; Sun, 28 Jun 2015 13:11:02 -0700 (PDT) Received: from [192.168.43.95] ([31.4.238.29]) by mx.google.com with ESMTPSA id h9sm333499wjq.10.2015.06.28.13.11.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 28 Jun 2015 13:11:01 -0700 (PDT) Message-ID: <559054D2.9000601@8Kdata.com> Date: Sun, 28 Jun 2015 22:10:58 +0200 From: =?UTF-8?B?w4FsdmFybyBIZXJuw6FuZGV6IFRvcnRvc2E=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Dave Cramer CC: List 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> <558FC1ED.3000401@8Kdata.com> <001401d0b187$fe63d080$fb2b7180$@eu> <558FC5AD.3040908@8Kdata.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------040508030007000808090703" 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 This is a multi-part message in MIME format. --------------040508030007000808090703 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 28/06/15 15:56, Dave Cramer wrote: > So I think we should support JSR 353 at the very least Whether we > extend the result set or not we can at a minimum return a JsonValue > from getObject > > I agree with Alvaro, 99% of the users would just like a JsonValue > returned. It would be nice if we could design this so more advanced > users could plug in their parser of choice. Yes, at least to have a JsonValue would be a really nice addition. To plug your parser, JSR 353 follows Java's standard SPI and is as simple as write the fqcn of the driver implementation to META-INF/services/javax.json.spi.JsonProvider. So rather than asking everybody to do that, it would be even nicer to embed the JSR353 Reference Implementation (a mere 64Kb) and let advanced users override the parser by writing the services file. I know that adding external dependencies is not everybody's favorite idea here, but I really believe it definitely help (most) users and would allow us to ship a driver that would work out-of-the-box with JSON. Regards, Álvaro -- Álvaro Hernández Tortosa ----------- 8Kdata > > Dave Cramer > > dave.cramer(at)credativ(dot)ca > http://www.credativ.ca > > On 28 June 2015 at 06:00, Álvaro Hernández Tortosa > wrote: > > > On 28/06/15 11:51, Markus KARG wrote: > > 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. > > To have proper JSON support at the protocol level (something > which I'd love to have) only translates to more performance, no > more functionality. So is a nice-to-have, not a must-to-have (as > is supporting PostgreSQL's json data types). > > > 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. > > We have had to extend JDBC in several ways in the past. We > should do it again, now, in the best possible manner (getObject, > PGResultSet, whatever). And then, if JDBC adds support in the > future, retrofit into it. But not wait until then, because we > don't even know if that would even happen. > > Cheers, > > > Á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 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) > 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 > > > > > > -- > Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org > ) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-jdbc > > --------------040508030007000808090703 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 28/06/15 15:56, Dave Cramer wrote:
So I think we should support JSR 353 at the very least Whether we extend the result set or not we can at a minimum return a JsonValue  from getObject

I agree with Alvaro, 99% of the users would just like a JsonValue returned. It would be nice if we could design this so more advanced users could plug in their parser of choice.

    Yes, at least to have a JsonValue would be a really nice addition.

    To plug your parser, JSR 353 follows Java's standard SPI and is as simple as write the fqcn of the driver implementation to META-INF/services/javax.json.spi.JsonProvider. So rather than asking everybody to do that, it would be even nicer to embed the JSR353 Reference Implementation (a mere 64Kb) and let advanced users override the parser by writing the services file. I know that adding external dependencies is not everybody's favorite idea here, but I really believe it definitely help (most) users and would allow us to ship a driver that would work out-of-the-box with JSON.

    Regards,

    Álvaro


-- 
Álvaro Hernández Tortosa


-----------
8Kdata



Dave Cramer

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

On 28 June 2015 at 06:00, Álvaro Hernández Tortosa <aht@8kdata.com> wrote:

On 28/06/15 11:51, Markus KARG wrote:
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.
    To have proper JSON support at the protocol level (something which I'd love to have) only translates to more performance, no more functionality. So is a nice-to-have, not a must-to-have (as is supporting PostgreSQL's json data types).

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.
    We have had to extend JDBC in several ways in the past. We should do it again, now, in the best possible manner (getObject, PGResultSet, whatever). And then, if JDBC adds support in the future, retrofit into it. But not wait until then, because we don't even know if that would even happen.

    Cheers,


    Á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 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)
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





--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc


--------------040508030007000808090703--