Re: a problem with index and user define type

From: Weiping He <laser(at)zhengmai(dot)com(dot)cn>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Wang Mike <itlist(at)msn(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: a problem with index and user define type
Date: 2003-06-27 03:08:48
Message-ID: 3EFBB540.7020200@zhengmai.com.cn
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:

>Weiping He <laser(at)zhengmai(dot)com(dot)cn> writes:
>
>
>>because the data type (UUID) is a struct,
>>and the uuid_eq() function accept two pointer to the value of struct uuid,
>>if make it IMMUTABLE, postgresql would think it should not try to run
>>the function, but return the cached value instead when it get two same
>>pointers input,
>>
>>
>
>No, it will not. Your claim above is entirely wrong; the fact that the
>datatype is pass-by-reference doesn't affect anything (unless you've
>failed to declare the datatype that way, but if so I'd not think it
>would work at all).
>
> regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>
>
>
yeah, you are right, it's out fault. We've mistakenly use PG_RETURN_INT16()
to return from our am support function, which prune the sign
information from the memcmp(),
but we still declare the function to return INTEGER when CREATE
FUNCTION. So the error,
it's fixed now, and the datatype and index run smoothly.

Thanks and Regards

Laser

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2003-06-27 03:10:03 Tablespaces (was Re: [GENERAL] Physical Database Configuration )
Previous Message Christopher Kings-Lynne 2003-06-27 03:08:15 Re: [GENERAL] Physical Database Configuration