From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | ouellet marc-andre <Ouellet_MarcAndre(at)hotmail(dot)com> |
Cc: | "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Having difficulties partitionning with jsonb |
Date: | 2019-08-25 13:46:32 |
Message-ID: | CAMkU=1z0S22WRA0O2qM49dAn1ZZO_NbSM5MpBLF6E=v4Z-vyKQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Aug 22, 2019 at 5:41 PM ouellet marc-andre <
Ouellet_MarcAndre(at)hotmail(dot)com> wrote:
> CREATE TABLE test ( id integer, data jsonb ) Partition by range (( data
> #>> '{info,time}' ));
>
> CREATE TABLE test_part1 PARTITION OF test
> FOR VALUES FROM ('30000') TO ('40000');
>
> INSERT INTO test VALUES (1,'{"info":[{"time":39814.0,"value":2}, {"time
> ":39815.0,"value":3}]}');
>
>
The partitioning expression yields NULL on the given input.
select '{"info":[{"time":39814.0,"value":2},
{"time":39815.0,"value":3}]}'::jsonb #>> '{info,time}';
?column?
----------
(null)
(1 row)
Maybe you meant '{info,0,time}', or maybe you meant '{info,1,time}'. Or
maybe you meant something else. You will have to explain yourself.
Cheers,
Jeff
>
From | Date | Subject | |
---|---|---|---|
Next Message | stan | 2019-08-25 14:13:07 | What is the difference between creating a type, and a domain ? |
Previous Message | Jeff Janes | 2019-08-25 13:17:48 | Re: A question aboout postgresql-server-dev versions |