Amit Gupta wrote:
We need insert rows to a catalog table that would store partitions info:CATALOG(pg_partition,2336) BKI_WITHOUT_OIDS { Oid partrelid; /* partition table Oid */ Oid parentrelid; /* Parent table Oid */ int2 parttype; /* Type of partition, list, hash, range */ int2 partkey; /* partition key */ Oid keytype; /* type of partition key */ int2 keyorder; /* order of the key in multi-key partitions */ bytea minval; bytea maxval; /* min and max for range partition */ bytea listval; int2 hashval; /* hash value */ } FormData_pg_partition;
I realize you're still in early phase of hacking, but let me just point out that bytea is hardly the right data type for min/max value, unless the partitioning key is actually a bytea column. I can't suggest a better alternative off the top of my head. We have hacked around that problem in pg_statistic stavalues columns, but it really is a hack.
-- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
