From: huangning290@yahoo.com <huangning290@yahoo.com>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: GIN index
Date: Tue, 25 Jan 2022 02:42:14 +0000 (UTC)
Message-ID: <147894193.1340405.1643078534794@mail.yahoo.com> (raw)
References: <147894193.1340405.1643078534794.ref@mail.yahoo.com>
Hi:I created a new variable-length data type, and now I want to create a GIN index for it. According to the rules of GIN index, I created three functions: extractValue, extractQuery, and compare. I made sure that the return value of the first two functions is the address of the array, but when using the index query, the GIN tuple data obtained by calling PG_GETARG_DATUM in the compare function is incorrect, and it is misplaced! In memory the size of the data header becomes something else, and the position of the first byte is not the header, it becomes the fourth byte. So there is a high probability that the function called is wrong or my return value is wrong when creating the index or the error is somewhere else?
regards!
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: huangning290@yahoo.com
Subject: Re: GIN index
In-Reply-To: <147894193.1340405.1643078534794@mail.yahoo.com>
References: <147894193.1340405.1643078534794.ref@mail.yahoo.com> <147894193.1340405.1643078534794@mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox