Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHrfv-0006Z2-SW for pgsql-docs@arkaria.postgresql.org; Tue, 28 Jun 2016 11:59:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bHrfv-0008K0-8k for pgsql-docs@arkaria.postgresql.org; Tue, 28 Jun 2016 11:59:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bHrfZ-0007wl-Rd for pgsql-docs@postgresql.org; Tue, 28 Jun 2016 11:59:09 +0000 Received: from mail-lf0-x22d.google.com ([2a00:1450:4010:c07::22d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bHrfW-0003Is-Aj for pgsql-docs@postgresql.org; Tue, 28 Jun 2016 11:59:09 +0000 Received: by mail-lf0-x22d.google.com with SMTP id f6so9675135lfg.0 for ; Tue, 28 Jun 2016 04:59:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:message-id:mime-version:subject:date:references:to:in-reply-to; bh=dKVquaHKbLVKHdsvLTntCJ9//lOWF3UrMXfV+YKuJC0=; b=SfFEt8da6Tbq9GcUdLBDfd11WDSi/DQTb5dJiKGvAiIAx1UbJL29RHgZURkvRXBVE8 tcq+8b9ITPJgCvMN9EerT8bBiWtmtit6BlU/2ysczknisNviBMBh6tqLTubOYg7wI2lU PHcoyveQFPAq2qiZNlA3dos+x5DQAc7QLOLCajxIVIu5ubLttTajv+VW8Yof0CEWvx4O bsy9FrpFbIBf9JS/uY4trgOPRfahhlmn0xo/FZPlNJRlW0uBwrOh6HvmGlN8SCutgkJG kThQcyZF+/vpFJbD/nv1MZap0QJmMtmArwsYm5rQ9KCdG4l/AeVib7fZ5ZxqJpnwjc2l JYWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:mime-version:subject:date :references:to:in-reply-to; bh=dKVquaHKbLVKHdsvLTntCJ9//lOWF3UrMXfV+YKuJC0=; b=ChpSjoUmzh4/xOvAehdpEdj0BSgyxteUU980XlIBSABxxRyPlPuWXyT42NhIomMXSP gp9zZFxf7Soe0t7o5Lhf9IPFHSm8IdNNDgxFNyEO2dpGTDuT38jKFoJrj9rxjyGA1DQX 7KN1bK8SFznNaBpDaQVXASGAV9drwGq6hC5x3pWp4R6P8Xl3p2DyxODYFyNgfLCoqFDe gD3SLhiAgw3iWVz4Vj2gy9g3NxbyDxtK5ahHo6AnNBS3W7XFVu69lKH88dh+zmoRCK2Z uY20fDPd1kyjBi6NNEDSGQauU0jjvS7GgJCZBUd46Gatc2S/cqSifr01w+Ux0O59YC1t uFmg== X-Gm-Message-State: ALyK8tIW/JCcaT0vAFWNxg6mdPb+COz+Vea7mTxIT5exRk6KVD0yTWsLMTiw5eB8v9D63w== X-Received: by 10.46.9.198 with SMTP id 189mr265002ljj.5.1467115144410; Tue, 28 Jun 2016 04:59:04 -0700 (PDT) Received: from [192.168.185.16] ([80.94.224.211]) by smtp.gmail.com with ESMTPSA id n72sm4105400lfi.39.2016.06.28.04.59.02 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 28 Jun 2016 04:59:03 -0700 (PDT) From: Anthony Ananich Content-Type: multipart/alternative; boundary="Apple-Mail=_BDB61B10-CB2B-4415-9BB1-BA6A07D13E5B" Message-Id: Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Override sort order Date: Tue, 28 Jun 2016 14:58:38 +0300 References: To: pgsql-docs@postgresql.org In-Reply-To: X-Mailer: Apple Mail (2.1878.6) X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --Apple-Mail=_BDB61B10-CB2B-4415-9BB1-BA6A07D13E5B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Just in case: by previous question I mean this one: = https://www.postgresql.org/message-id/1BFCD444-70DD-4A32-B2AB-CEFCC2922419= @gmail.com On Jun 28, 2016, at 14:31, Anthony Ananich = wrote: > Dear All, >=20 > I=92ve got a need to change sort order for jsonb field. I=92m looking = for a way to change =93order by=94 behavior like it is described in my = previous question. >=20 > I=92ve found a piece of doc which says that it is possible to override = method =93int compare(Datum a, Datum b)=94 here: > https://www.postgresql.org/docs/9.5/static/gin-extensibility.html >=20 > I wonder if there are any examples available?=20 >=20 > If not I=92m opened to offer my help in making one. >=20 > Regards, > Anthony Ananich > http://ananich.pro --Apple-Mail=_BDB61B10-CB2B-4415-9BB1-BA6A07D13E5B Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252
Just in case: by previous question I mean this = one:

On Jun 28, 2016, = at 14:31, Anthony Ananich <anton.ananich@gmail.com> = wrote:

Dear All,

I=92ve got a = need to change sort order for jsonb field. I=92m looking for a way to = change =93order by=94 behavior like it is described in my previous = question.

I=92ve found a piece of doc which = says that it is possible to override method =93int compare(Datum a, = Datum b)=94 here:
https://www.postgresql.org/docs/9.5/static/gin-extensibility.html
I wonder if there are any examples = available? 

If not I=92m opened to offer = my help in making = one.

Regards,
Anthony = Ananich

= --Apple-Mail=_BDB61B10-CB2B-4415-9BB1-BA6A07D13E5B--