Int2 vector to array equality

Started by Andreas Pflugover 22 years ago3 messagespatches
Jump to latest
#1Andreas Pflug
pgadmin@pse-consulting.de

While trying to

pg_constraint JOIN pg_index ON indrelid=conrelid AND conkey=indkey

I noticed (once again) that these columns have different types (although
describing the same thing), and there's no equality operator for them.

The attached patch adds an equality operator
bool int2array_int2vector_eq(int2[], int2vector)

to enable this join.

Regards,
Andreas

Attachments:

int2arrayveceq.difftext/plain; name=int2arrayveceq.diffDownload+74-0
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andreas Pflug (#1)
Re: Int2 vector to array equality

Andreas Pflug <pgadmin@pse-consulting.de> writes:

The attached patch adds an equality operator
bool int2array_int2vector_eq(int2[], int2vector)

This seems like a remarkably specialized kluge ... gotta be a
better way ...

regards, tom lane

#3Andreas Pflug
pgadmin@pse-consulting.de
In reply to: Tom Lane (#2)
Re: Int2 vector to array equality

Tom Lane wrote:

Andreas Pflug <pgadmin@pse-consulting.de> writes:

The attached patch adds an equality operator
bool int2array_int2vector_eq(int2[], int2vector)

This seems like a remarkably specialized kluge ... gotta be a
better way ...

How? This could be coded to support any element type, but we only have
int2vector anyway.

Regards,
Andreas