Re: Writing and Reading bytea

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Writing and Reading bytea
Дата
Msg-id 499448AD.6000101@enterprisedb.com
обсуждение исходный текст
Ответ на Writing and Reading bytea  (Amit Gupta <amit.pc.gupta@gmail.com>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Writing and Reading bytea
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: pg_restore --multi-thread