On Jan 3, 2010, at 4:18 PM, Hitoshi Harada wrote:
> That sounds good and seems possible, as far as operator returns JSON
> always. Perhaps every JSON fetching returns JSON even if the result
> would be a number. You can cast it.
>
> % SELECT ('{"foo":{"bar":["a","b","c"]}}' -> '["foo"][1]')::text;
> 1
> -----
> b
No, because 'b' isn't valid JSON. So if we want an interface that returns scalars, they can't be JSON.
Best,
David