Discussion:
int2[] vs int2vector in pg_catalog?
Fabien COELHO
2004-03-29 07:41:25 UTC
Permalink
Dear hackers,

I'm wondering for the rationnal of the types used in various tables in
pg_catalog (v 7.4.2) so as to represent the very same thing:

- in pg_index, the indkey is represented by a int2vector

- in pg_constraint, conkey and confkey are represented my smallint[]

As I was trying to compare the two, I have to resort to some hacks.

It also appears that there are very few available function to deal with
int2vector at the SQL or PL/pgSQL level. Basically I found none:-(

Any comments?
--
Fabien Coelho - ***@cri.ensmp.fr

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
Tom Lane
2004-03-29 20:23:34 UTC
Permalink
Post by Fabien COELHO
I'm wondering for the rationnal of the types used in various tables in
History and backwards compatibility, mostly.
Post by Fabien COELHO
From the standpoint of the backend I don't think there is any
fundamental reason why we couldn't change pg_index.indkey and indclass
into varlena arrays, but I'd be worried about breaking existing
client-side code that looks at those columns. In particular the
question of whether indexing starts at 0 or 1 would be nasty.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ***@postgresql.org so that your
message can get through to the mailing list cleanly

Loading...