On 08/06/2013 08:42 AM, Robert Haas wrote:
On Fri, Aug 2, 2013 at 8:22 AM, Andrew Tipton wrote:
But without json_is_scalar(), the choice is one of these two forms:
json_typeof() NOT IN ('object', 'array')
json_typeof() IN ('string', 'number', 'boolean', 'null')
The first of those is wha
On Fri, Aug 2, 2013 at 8:22 AM, Andrew Tipton wrote:
> But without json_is_scalar(), the choice is one of these two forms:
> json_typeof() NOT IN ('object', 'array')
> json_typeof() IN ('string', 'number', 'boolean', 'null')
The first of those is what seemed to make sense to me. The user can
Merlin Moncure escribió:
> On Fri, Aug 2, 2013 at 7:22 AM, Andrew Tipton wrote:
> > On Fri, Aug 2, 2013 at 8:12 PM, Robert Haas wrote:
> >>
> >> +1, but I'm wondering why we need anything more than just
> >> json_typeof(). Doesn't that pretty much cover it?
> >
> > I agree with Merlin that json_
On Fri, Aug 2, 2013 at 7:22 AM, Andrew Tipton wrote:
> On Fri, Aug 2, 2013 at 8:12 PM, Robert Haas wrote:
>>
>> +1, but I'm wondering why we need anything more than just
>> json_typeof(). Doesn't that pretty much cover it?
>
>
> I agree with Merlin that json_is_object() is superfluous, since it
On Fri, Aug 2, 2013 at 8:12 PM, Robert Haas wrote:
> +1, but I'm wondering why we need anything more than just
> json_typeof(). Doesn't that pretty much cover it?
>
I agree with Merlin that json_is_object() is superfluous, since it can just
be replaced with json_typeof() = 'object'. Likewise f
On Mon, Jul 29, 2013 at 5:36 PM, Merlin Moncure wrote:
> On Mon, Jul 29, 2013 at 2:16 AM, Andrew Tipton wrote:
>> The attached patch adds four new SQL functions for the JSON type:
>> json_typeof(json) RETURNS text
>> json_is_object(json) RETURNS boolean
>> json_is_array(json) RETURNS
On Mon, Jul 29, 2013 at 2:16 AM, Andrew Tipton wrote:
> The attached patch adds four new SQL functions for the JSON type:
> json_typeof(json) RETURNS text
> json_is_object(json) RETURNS boolean
> json_is_array(json) RETURNS boolean
> json_is_scalar(json) RETURNS boolean
>
> The mot
On 07/29/2013 03:16 AM, Andrew Tipton wrote:
The attached patch adds four new SQL functions for the JSON type:
json_typeof(json) RETURNS text
json_is_object(json) RETURNS boolean
json_is_array(json) RETURNS boolean
json_is_scalar(json) RETURNS boolean
Please add to the next
The attached patch adds four new SQL functions for the JSON type:
json_typeof(json) RETURNS text
json_is_object(json) RETURNS boolean
json_is_array(json) RETURNS boolean
json_is_scalar(json) RETURNS boolean
The motivating use-case for this patch is the ability to easily create a
do