Re: [HACKERS] Number of index fields configurable

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Number of index fields configurable
Date: 2000-01-10 16:09:36
Message-ID: 200001101609.LAA15630@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > I will tweek the code to properly check for trailing numbers. Right now
> > multiple spaces cause problems, and trailing numbers are ignored. With
> > oidn, we can get away with trailing zeros because an oid of 0 is
> > invalid, but with int2n, a zero is valid, so I think we can't just ignore
> > extra trailing zeros. We can pad with zeros, however. Comments?
>
> For the primary use of these things, which is attribute numbers in
> pg_index, padding or dropping zeroes is correct behavior --- unused
> positions in the vector will have zero values, same as for the oid
> vector. I think it's OK to define the type's behavior suitably for
> the system's use, because it's not intended as a general-purpose user
> type; users oughta be using int2[]. (Really, the only reason we have
> these types at all is that we depend on having compile-time-constant
> field sizes in the system catalogs that are accessed via
> include/catalog/'s struct declarations...)

Renamed oid8 ->oidvector and int28->int2vector. initdb everyone. New
type names require it.

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-01-10 16:24:44 oid8/int28
Previous Message Vince Vielhaber 2000-01-10 16:09:06 Simmultanous Connections (fwd)