Re: Jsonb: jbvBinary usage in the convertJsonbValue?

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Subject: Re: Jsonb: jbvBinary usage in the convertJsonbValue?
Date: 2014-06-02 17:38:27
Message-ID: CAM3SWZSRVByrSbBK5QPDZHpVQGfSrmMqbz8WzvyqAQRk2A2RLQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 2, 2014 at 7:22 AM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> Yes, I've just been looking at that. I think this is probably a hangover
> from when these routines were recast to some extent. Given that we're not
> seeing any errors from it, I'd be inclined to remove the the "|| val->type
> == jbvBinary" part. One of the three call sites to convertJsonbValue asserts
> that this can't be true, and doing so doesn't result in a regression
> failure.

Well, I guess the latter condition should be moved, since clearly the
jbvBinary case isn't handled within convertJsonbScalar(). It would be
mildly preferable to have a more accurate error message (the
convertJsonbValue() error) if that "can't happen" condition should
ever happen.

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2014-06-02 17:40:32 Re: Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?
Previous Message Tom Lane 2014-06-02 17:36:52 Re: Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?