Skip to content

Instantly share code, notes, and snippets.

@wkalt
Created October 29, 2019 03:54
Show Gist options
  • Save wkalt/a298fe82c564668c803b3537561e67a0 to your computer and use it in GitHub Desktop.
Save wkalt/a298fe82c564668c803b3537561e67a0 to your computer and use it in GitHub Desktop.
create table demo (
id int,
useless int,
d timestamp,
b boolean
) partition by range (id, d);
alter table demo drop column useless;
-- only seems to cause failure when it's a partial index on b.
create index on demo(b) where b = 't';
create table demo_1_20191031 partition of demo for values from (1, '2019-10-31') to (1, '2019-11-01');
-- psql:foo.sql:13: ERROR: unexpected varattno 4 in expression to be mapped
-- Time: 2.619 ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment