Re: Curiosity with catalog table array attribute index dimensions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Erik Jones <erik(at)myemma(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Curiosity with catalog table array attribute index dimensions
Date: 2008-04-16 21:26:32
Message-ID: 23379.1208381192@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Erik Jones <erik(at)myemma(dot)com> writes:
> So, I noticed today that pg_index.indkey index values start at 0
> instead of 1 as I'd expected. Are there other cases of this?
> Shouldn't that be documented somewhere?

Well, the CREATE TYPE manual page has

For historical reasons (i.e., this is clearly wrong but it's far too
late to change it), subscripting of fixed-length array types starts from
zero, rather than from one as for variable-length arrays.

oidvector and int2vector aren't fixed-length anymore, but they maintain
their old behavior in this respect for backward compatibility.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Erik Jones 2008-04-16 21:34:15 Re: Curiosity with catalog table array attribute index dimensions
Previous Message Bruce Momjian 2008-04-16 20:58:43 Re: How to recovery data from folder data installation?