Re: Jsonb: jbvBinary usage in the convertJsonbValue? - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: Jsonb: jbvBinary usage in the convertJsonbValue?
Date
Msg-id CAM3SWZSRVByrSbBK5QPDZHpVQGfSrmMqbz8WzvyqAQRk2A2RLQ@mail.gmail.com
Whole thread Raw
In response to Re: Jsonb: jbvBinary usage in the convertJsonbValue?  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Mon, Jun 2, 2014 at 7:22 AM, Andrew Dunstan <andrew@dunslane.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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?
Next
From: Stephen Frost
Date:
Subject: Re: Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE?