Commit Graph

6754 Commits (c44682a7d0641748c7fb3427fdb90ea2ae465a47)

Author SHA1 Message Date
Jason Petersen 5028f61a47 Merge pull request #328 from citusdata/feature-fix_varchar#201
Handle hash-partitioned aliased data types

cr: @marcocitus
2016-02-12 10:04:57 -07:00
Jason Petersen 6f308c5e2d
Allow DML commands on append-partitioned tables
This entirely removes any restriction on the type of partitioning
during DML planning and execution. Though there aren't actually any
technical limitations preventing DML commands against append- (or even
range-) partitioned tables, we had initially forbidden this, as any
future stage operation could cause shards to overlap, banning all
subsequent DML operations to partition values contained within more
than one shards. This ended up mostly restricting us, so we're now
removing that restriction.
2016-02-11 16:09:35 -07:00
Jason Petersen d164305929
Handle hash-partitioned aliased data types
When two data types have the same binary representation, PostgreSQL may
add an implicit coercion between them by wrapping a node in a relabel
type. This wrapper signals that the wrapped value is completely binary
compatible with the designated "final type" of the relabel node. As an
example, the varchar type is often relabeled to text, since functions
provided for use with text (comparisons, hashes, etc.) are completely
compatible with varchar as well.

The hash-partitioned codepath contains functions that verify queries
actually contain an equality constraint on the partition column, but
those functions expect such constraints to be comparison operations
between a Var and Const. The RelabelType wrapper node causes these
functions to always return false, which bypasses shard pruning.
2016-02-11 13:50:43 -07:00
Onder Kalaci 136306a1fe Initial commit of Citus 5.0 2016-02-11 04:05:32 +02:00