Re: Cast jsonb to numeric, int, float, bool

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>, David Steele <david(at)pgmasters(dot)net>, Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>, Darafei Praliaskouski <me(at)komzpa(dot)net>, Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Cast jsonb to numeric, int, float, bool
Date: 2018-05-08 19:41:35
Message-ID: 16735.1525808495@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Teodor Sigaev <teodor(at)sigaev(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2018-05-08 20:45:01 Re: perlcritic script
Previous Message Alvaro Herrera 2018-05-08 19:36:21 Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors