Tom Lane wrote:
Weiping He <[EMAIL PROTECTED]> 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 whe
Weiping He <[EMAIL PROTECTED]> 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
Tom Lane wrote:
Weiping He <[EMAIL PROTECTED]> writes:
we found the problem:
We used IMMUTABLE modifier in our CREATE FUNCTION definition,
though it's correct for our function to return same value if input the
same *data*,
but our data are passed by reference, not by value, so, some times we c
Weiping He <[EMAIL PROTECTED]> writes:
> we found the problem:
> We used IMMUTABLE modifier in our CREATE FUNCTION definition,
> though it's correct for our function to return same value if input the
> same *data*,
> but our data are passed by reference, not by value, so, some times we can't
> ret
we found the problem:
We used IMMUTABLE modifier in our CREATE FUNCTION definition,
though it's correct for our function to return same value if input the
same *data*,
but our data are passed by reference, not by value, so, some times we can't
retrive out data. Remove IMMUTABLE fixed the problem.
Weiping He <[EMAIL PROTECTED]> writes:
> the situation trun worse: now the explain shows the query using the
> index,
> the we can't select out the match row! Any hint about what's wrong
> with us?
My bet: either your operators are broken or your operator class
definition is wrong.
Tom Lane wrote:
"Wang Mike" <[EMAIL PROTECTED]> writes:
but this query: select * from test_uuid where id =
'df2b10aa-a31d-11d7-9867-0050babb6029'::uuid dosn't use index
QUERY PLAN
---
Seq Scan on te
"Wang Mike" <[EMAIL PROTECTED]> writes:
> but this query: select * from test_uuid where id =
> 'df2b10aa-a31d-11d7-9867-0050babb6029'::uuid dosn't use index
> QUERY PLAN
> ---
> Seq Scan on test_uuid (cost=
Hi all:
I write a use define type (UUID)
typedef struct uuid
{
uint32 time_low;
uint16 time_mid;
uint16 time_hi_and_version;
uint8 clock_seq_hi_and_reserved;
uint8 clock_seq_low;
uint8 node[6];
} uuid;
make all btree index function and operator, suc