public inbox for [email protected]  
help / color / mirror / Atom feed
From: jian he <[email protected]>
To: Andy Fan <[email protected]>
Cc: Pavel Stehule <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: Extract numeric filed in JSONB more effectively
Date: Mon, 7 Aug 2023 17:36:40 +0800
Message-ID: <CACJufxH0jZF1rRDq+=44X=x3+LAuutdCZ3WwA+mx8R3LOgiahg@mail.gmail.com> (raw)
In-Reply-To: <CAKU4AWrXxxY_Qt_L0VXy-Uuv1yvvnvkOGC2VyLpHF=gpeQa1Eg@mail.gmail.com>
References: <CAKU4AWoqAVya6PBhn+BCbFaBMt3z-2=i5fKO3bW=6HPhbid2Dw@mail.gmail.com>
	<CACJufxHASOEpngQ8V2tbXgs4VZC3ETrVbS=uk0KC_B_J1j7ejQ@mail.gmail.com>
	<CAKU4AWrap1zpYqunJwWTN=CdP7E8e0U4mYmwn7hvTW3ERuENVg@mail.gmail.com>
	<CAFj8pRD-R-GsGCjeYApbhZoiW8TV6zACaYStMBMM0=--+WgN_A@mail.gmail.com>
	<CAKU4AWpDdFXAD+dMC1HeErXSKBUUBRGWkf=dAcX3wZgBNsWM=g@mail.gmail.com>
	<CAFj8pRAO3oEiBaJJ9=HZp6CoP2ffbwSgrKkLKjPfYZwx9wOOuQ@mail.gmail.com>
	<CAKU4AWoCHpKAVuQeOrk44cVPy_dVxn1aHrMUvHy5Ag-daFCSsQ@mail.gmail.com>
	<CAFj8pRD4cdUmK0RG4oN5B2KRSeDhwfMYaL=XpfEu4iaLeZ_Kow@mail.gmail.com>
	<CAKU4AWp8ab61e96v57OaB-Gm1bMfBNVLVy+s17U6_Ne3veB84g@mail.gmail.com>
	<[email protected]>
	<CAKU4AWoLfjLi+maMxHxjL0OwSPcs58yiSgz-OiRodVpB5CvD1w@mail.gmail.com>
	<CAKU4AWrMKu2EV0YUA-5zHo4oNYWs7wpJ2RhT9RcLUTdYxDu7VA@mail.gmail.com>
	<CAFj8pRAEYbHTPPGgaMMmQK05sumMqBuQ25q8Fx0CGppubD9ZCA@mail.gmail.com>
	<CAKU4AWrXxxY_Qt_L0VXy-Uuv1yvvnvkOGC2VyLpHF=gpeQa1Eg@mail.gmail.com>

Hi.

+Datum
+jsonb_object_field_type(PG_FUNCTION_ARGS)
+{
+ Jsonb    *jb = PG_GETARG_JSONB_P(0);
+ text    *key = PG_GETARG_TEXT_PP(1);
+ Oid targetOid = PG_GETARG_OID(2);

compared with jsonb_numeric. I am wondering if you need a free *jb.
elog(INFO,"jb=%p arg pointer=%p ", jb, PG_GETARG_POINTER(0));
says there two are not the same.






view thread (9+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Extract numeric filed in JSONB more effectively
  In-Reply-To: <CACJufxH0jZF1rRDq+=44X=x3+LAuutdCZ3WwA+mx8R3LOgiahg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox