pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Teodor Sigaev <teodor@sigaev.ru>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Cc: Aleksander Alekseev <a.alekseev@postgrespro.ru>
Cc: David Steele <david@pgmasters.net>
Cc: Nikita Glukhov <n.gluhov@postgrespro.ru>
Cc: Darafei Praliaskouski <me@komzpa.net>
Cc: Anastasia Lubennikova <a.lubennikova@postgrespro.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Cast jsonb to numeric, int, float, bool
Date: Tue, 08 May 2018 15:41:35 -0400
Message-ID: <16735.1525808495@sss.pgh.pa.us> (raw)
In-Reply-To: <dda6f9a9-4290-a85b-7d4d-e4b9968bac7e@sigaev.ru>
References: <151985418868.6915.17223208131889314092.pgcf@coridan.postgresql.org>
	<76b000ae-94d1-cd8f-a2e0-e536096469b0@postgrespro.ru>
	<d75ed4fe-574b-41c7-080f-ed662fa5d9ba@pgmasters.net>
	<20180327145337.GA20311@e733.localdomain>
	<ca0bdf99-98a5-3a44-3f49-13941e0634ca@sigaev.ru>
	<912e1a07-90a9-ad97-bc70-d71ec0f6f073@sigaev.ru>
	<be43822f-7fd2-c5c2-8435-6a896d1ed46c@sigaev.ru>
	<CA+Tgmob08StTV9yu04D0idRFNMh+UoyKax5Otvrix7rEZC8rMw@mail.gmail.com>
	<0250b45d-4a38-5453-cb5a-8fa9883da36b@sigaev.ru>
	<20180330142119.GA1411@e733.localdomain>
	<20180330142423.GB1411@e733.localdomain>
	<d8j1sg1mvwp.fsf@dalvik.ping.uio.no>
	<CA+TgmoaYgUkbrpzYgBPhH31+9BioCRs3RF2Bcz8E-+zttcCB4A@mail.gmail.com>
	<bab83c35-2a25-927b-d28d-f836402c48ba@sigaev.ru>
	<24822.1525789657@sss.pgh.pa.us>
	<2087.1525792633@sss.pgh.pa.us>
	<dda6f9a9-4290-a85b-7d4d-e4b9968bac7e@sigaev.ru>

Teodor Sigaev <teodor@sigaev.ru> writes:
> Thanks for your idea, patch is attached

Looks mostly fine from here.  A couple nitpicks:

* s/translable/translatable/

* Personally I'd try harder to make the lookup table constant, that is

+	static const struct
+	{
+		enum jbvType	type;
+		const char	*msg;
+	}
+		messages[] =
+	{

in hopes that it'd end up in the text segment.

			regards, tom lane




view thread (31+ messages)

Message-ID: <16735.1525808495@sss.pgh.pa.us>
Permalink:  ../16735.1525808495@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16735.1525808495@sss.pgh.pa.us

 · 

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: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, teodor@sigaev.ru, robertmhaas@gmail.com, ilmari@ilmari.org, a.alekseev@postgrespro.ru, david@pgmasters.net, n.gluhov@postgrespro.ru, me@komzpa.net, a.lubennikova@postgrespro.ru, pgsql-hackers@lists.postgresql.org
  Subject: Re: Cast jsonb to numeric, int, float, bool
  In-Reply-To: <16735.1525808495@sss.pgh.pa.us>

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

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