On 2016/12/10 7:55, Keith Fiske wrote:
> Working on a blog post for this feature and just found some more
> inconsistencies with the doc examples. Looks like the city_id column was
> defined in the measurements table when it should be in the cities table.
> The addition of the partition to the cities table fails since it's missing.
>
> Examples should look like this:
>
> CREATE TABLE measurement (
> logdate date not null,
> peaktemp int,
> unitsales int
> ) PARTITION BY RANGE (logdate);
>
> CREATE TABLE cities (
> city_id bigserial not null,
> name text not null,
> population int
> ) PARTITION BY LIST (initcap(name));
>
> I actually changed my example to have city_id use bigserial to show that
> sequences are inherited automatically. May be good to show that in the docs.
Attached is a documentation patch fixing inconsistencies in the examples
that Keith reports and also improve them a bit (cities_west example sounds
a bit contrived now that I think).
Also, I posted a patch earlier [1] to mention the limitation that row
movement caused by UPDATE is treated an error. I have combined it into
this patch, so that all the documentation fixes proposed are together.
Thanks,
Amit
[1]
https://www.postgresql.org/message-id/a4f261c2-8554-f443-05ff-d97dddc19689%40lab.ntt.co.jp
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers