Hi, > On Apr 12, 2018, at 12:12 AM, Kyotaro HORIGUCHI > <horiguchi.kyot...@lab.ntt.co.jp> wrote: > > Hello. > > At Wed, 11 Apr 2018 09:43:37 -0400, "Jonathan S. Katz" > <jonathan.k...@excoventures.com <mailto:jonathan.k...@excoventures.com>> > wrote in <efeba03d-effc-46e2-a0f7-41d004870...@excoventures.com > <mailto:efeba03d-effc-46e2-a0f7-41d004870...@excoventures.com>> >> case EXPR_KIND_PARTITION_BOUNDS: >> ^~~~~~~~~~~~~~~~~~~~~~~~~~ > .. >> 2 errors generated. >> >> The attached patch fixes the error. > > Sorry for the silly mistake. > >> I ran the following cases: >> >> Case #1: My Original Test Case >> >> CREATE TABLE records ( >> id int GENERATED BY DEFAULT AS IDENTITY NOT NULL, >> record_date date NOT NULL, >> record_text text, >> archived bool NOT NULL DEFAULT FALSE >> ) PARTITION BY LIST(archived); >> >> CREATE TABLE records_archive >> PARTITION OF records >> FOR VALUES IN (TRUE); >> >> CREATE TABLE records_active >> PARTITION OF records >> FOR VALUES IN (FALSE); >> >> Everything created like a charm. >> >> Case #2: random() >> >> CREATE TABLE oddity ( >> id int GENERATED BY DEFAULT AS IDENTITY NOT NULL, >> random_filter int >> ) PARTITION BY LIST(random_filter); >> >> CREATE TABLE oddity_random >> PARTITION OF oddity >> FOR VALUES IN ((random() * 100)::int); >> >> I did a \d+ on oddity and: >> >> partitions=# \d+ oddity >> (truncated) >> Partition key: LIST (random_filter) >> Partitions: oddity_random FOR VALUES IN (19) >> >> So this appears to behave as described above. >> >> Attached is the patch with the fix for the build. This is the first time >> I’m attaching >> a patch for the core server, so apologizes if I missed up the formatting. > > Thank you for verification and the revised patch. The format is > fine and the fix is correct but I noticed that I forgot to remove > plural S's from error messages. The attached is the version with > the fix.
I applied the new version of the patch and ran through the above scenarios again. Everything behaved as expected from a user standpoint. Thanks, Jonathan