Re: create a new GIN index for my own type

From: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
To: "huangning290(at)yahoo(dot)com" <huangning290(at)yahoo(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: create a new GIN index for my own type
Date: 2021-10-04 13:49:48
Message-ID: 8c37c2e2-ed4d-ebd0-2b05-7c630133bf33@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/4/21 3:32 PM, huangning290(at)yahoo(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2021-10-04 14:14:10 Re: Problem in pg_basebackup of 1.7 TB database while replicating in PostgreSQL 9.4.( Master and slave both are in postgreSQL 9.4)
Previous Message Tomas Vondra 2021-10-04 11:43:54 Re: Problem in pg_basebackup of 1.7 TB database while replicating in PostgreSQL 9.4.( Master and slave both are in postgreSQL 9.4)