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

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
Cc: 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 13:56:31
Message-ID: bab83c35-2a25-927b-d28d-f836402c48ba@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>> How about "cannot cast jsonb $json_type to $sql_type" where $json_type
>> is the type inside the jsonb (e.g. string, number, boolean, array,
>> object)?
>
> Yes, that sounds pretty good.

Does anybody have an objections to patch?

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/

Attachment Content-Type Size
jsonb_cast_err_msg.patch text/x-patch 5.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Euler Taveira 2018-05-08 14:02:48 Re: Exposing guc_malloc/strdup/realloc for plugins?
Previous Message Chapman Flack 2018-05-08 13:51:40 Re: MAP syntax for arrays