Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cBlIQ-0001NI-P4 for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Nov 2016 16:30:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cBlIP-00074r-Jn for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Nov 2016 16:30:17 +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_2) (envelope-from ) id 1cBlGz-0005Sq-Dl for pgsql-hackers@postgresql.org; Tue, 29 Nov 2016 16:28:49 +0000 Received: from sub4.mail.dreamhost.com ([69.163.253.135] helo=homiemail-a106.g.dreamhost.com) by makus.postgresql.org with esmtps (TLS1.1:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cBlGs-0005Lt-Px for pgsql-hackers@postgresql.org; Tue, 29 Nov 2016 16:28:48 +0000 Received: from homiemail-a106.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a106.g.dreamhost.com (Postfix) with ESMTP id 43E9630002902; Tue, 29 Nov 2016 08:28:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=cryptonector.com; bh=+RZzv0t1lFR9kt c6RgA+38wC6Jk=; b=Dv+SPowS7anoBgXrCqO+8ayClJhQJP3mguaAU7SsqZvndo NpIt6xWRCuFkkml7DLYwunCp2cqZE69EP7WkqsZJhQnA4XYrXzZztS5AaClr+CJL 0mJ8BQ4ZY4voFIMDjJvIsUV/95ZZL8nJqG0jfSqUtBzbCb4WK8oZDBABKiXlU= Received: from localhost (cpe-70-123-158-140.austin.res.rr.com [70.123.158.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: nico@cryptonector.com) by homiemail-a106.g.dreamhost.com (Postfix) with ESMTPSA id A34523000291E; Tue, 29 Nov 2016 08:28:40 -0800 (PST) Date: Tue, 29 Nov 2016 10:28:38 -0600 From: Nico Williams To: Petr Jelinek Cc: Pavel Stehule , Christian Convey , David Fetter , PostgreSQL Hackers , Tom Lane Subject: Re: Tackling JsonPath support Message-ID: <20161129162837.GF24797@localhost> References: <20161128162639.GB27143@fetter.org> <20161128192343.GD11117@localhost> <80228378-f5ba-1291-872b-9812e103e37c@2ndquadrant.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <80228378-f5ba-1291-872b-9812e103e37c@2ndquadrant.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On Tue, Nov 29, 2016 at 05:18:17PM +0100, Petr Jelinek wrote: > Just to add to this, the SQL/JSON proposals I've seen so far, and what > Oracle, MSSQL and Teradata chose to implement already is basically > subset of jsonpath (some proposals/implementations also include > lax/strict prefix keyword on top of that). I think that should give us > some hint on what the base functionality should look like. Yes, that'd be base functionality. You can go above and beyond. I agree with Pavel that jq could be used as a user-defined function, but proper integration would be better because it would avoid the need to format and parse JSON around calls to jq, and also because PG could compile jq programs when preparing SQL statements. Besides, the libjq jv API is *very* nice. Nico -- -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers