Re: create a new GIN index for my own type - Mailing list pgsql-general

From huangning290@yahoo.com
Subject Re: create a new GIN index for my own type
Date
Msg-id 253999042.430598.1633655083588@mail.yahoo.com
Whole thread Raw
In response to Re: create a new GIN index for my own type  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
List pgsql-general

Thanks for you reply.This is my stack information.
Inline image

Another question is, I have already set INTERNALLENGTH in CREATE TYPE, do I need to set it elsewhere?
On Monday, October 4, 2021, 09:51:38 PM GMT+8, Tomas Vondra <tomas.vondra@enterprisedb.com> wrote:


On 10/4/21 3:32 PM, huangning290@yahoo.com wrote:
> I have already debugged the program according to this step, but I found
> that in the DataCopy function, the variable typlen should be 8, but it
> is -1,
>

Well, if you have debugged this, it'd be nice if you could share more
information (e.g. backtraces, etc.) otherwise others can just guess what
you saw. And that makes it much harder to help you.

I see you defined the data type as PASSEDBYVALUE, but you haven't
specified INTERNALLENGTH, so it's -1 (i.e. variable length). Obviously,
that can't be passed by value - not sure if this is intentional or just
a case of CREATE TYPE not checking it.


BTW it's customary not to top post - inline replies are much easier to
follow, as it makes clearer which parts you respond to. And please make
sure that you're responding to the mailing list, not just directly to
the other person.



regards

--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment

pgsql-general by date:

Previous
From: "Peter J. Holzer"
Date:
Subject: Re: Misplaced double quotes in error message
Next
From: talk to ben
Date:
Subject: Gist fastbuild and performances