Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXONP-0001Ch-RD for pgsql-general@arkaria.postgresql.org; Mon, 04 Oct 2021 13:51:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mXONO-0002F1-QA for pgsql-general@arkaria.postgresql.org; Mon, 04 Oct 2021 13:51:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXONO-0002De-48 for pgsql-general@lists.postgresql.org; Mon, 04 Oct 2021 13:51:30 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mXONK-0007vK-Sw for pgsql-general@postgresql.org; Mon, 04 Oct 2021 13:51:29 +0000 Received: by mail-ed1-x52e.google.com with SMTP id l7so41542548edq.3 for ; Mon, 04 Oct 2021 06:51:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=s87BeYDfweNQjuWyMB5sY14zPG8152vfMskVmPo0QPU=; b=Lf0EqVdDXhAleDgPKlF9pZFuvy4JM75z3z7jYwXvIlO9ZfKh0eOi7n1XZpywhAdeEY iZWCkmXVRm9+lU+ETdC+PhN8Gy4WZe2I+IATxp1r1OWYVCeZvaBloxKTF+/v5BUNMMGh ZvNS0Pojr2/LGj9cvKL6V0ir1bxuT0mLe6KhShAb2Y91W6zeWA+ru0O09gYnxYWVvNDi TWkj9SsNU/JsBO4bSAKuwdoYjevQN9i78PNgNLKBCAIj6NbeKw/1nA8JfK8z+5hLokXA 48hH8mHqQ0AtZCe2nQxqE2HPURXGtZ+7hJAWW8zT15BspYPK/Z1C0tSpRHDfCL2SEGCu Qk4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=s87BeYDfweNQjuWyMB5sY14zPG8152vfMskVmPo0QPU=; b=vCQktMDY8OKI4X+tr5b67LgHyYFKMspZSM0mpIxiYRn+SBhJBp+OtCY6wwSPpjXn2h nyktM47K4+5ds/GSs+MMFhyVu9XjFVeaFPdZ/70Cdz0uQbSE4Sw0bGjjUPM5myTpscZa lkP6kuxtDqt759aYHO9gC0vS1crMabAftwx3V9hT19EIrNzW2JqAseA/5U3zScN2M65W JScVeIE2rme8aqzxITKJohe/U+jthBUR5EfH8J5kyg/mNIdWnpptClHuHpryOJs8PaEk FJFRpjHhd1QuHP4enhmGjVKndHZyCB1Api9fW/BjVHmuf21P5xrDODNnvkOhPts2eSwF gOww== X-Gm-Message-State: AOAM531z8BZxOM+F6bfqs0jjVXiagbNh1tscCGXEfKwu0O1TA+fx0OX/ 4EvybTjBeBD2LtrLaOHzQ2SvftN9f2VUkt2DaAB3TaDWyBiBlB1Csh1u07hZKh/jNXP3m58/rLi XI955qmvBFHe8rXrULl3VqTVRC1h/ALwzG0uTsuoVaaLfT/SDObER4cEWzWZSmilF0TA5IZc74M m8ca3wLgaOOJHxpB62774yjfRpBSpJNK2f43whx08K9jmD6pyFWBExkbPHoxR7b8qfJTYcmOP60 vn1dgYwpUWAZz09YxicNTRJksXovv6MvBE36Q== X-Google-Smtp-Source: ABdhPJzx6JZEkSf0OCUdrHJ5lHfORtD167bGKm1mfKn2i62a+r+FqdV7n+JO71wMh5molTrW62y4ow== X-Received: by 2002:a17:907:97d2:: with SMTP id js18mr16820387ejc.191.1633355391735; Mon, 04 Oct 2021 06:49:51 -0700 (PDT) Received: from [10.137.0.18] (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id l16sm7244725eds.46.2021.10.04.06.49.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Oct 2021 06:49:51 -0700 (PDT) Subject: Re: create a new GIN index for my own type To: "huangning290@yahoo.com" References: <2030212581.1470350.1633329041369.ref@mail.yahoo.com> <2030212581.1470350.1633329041369@mail.yahoo.com> <62c8b51c-2fd2-32b6-5b55-17223bee7b2f@enterprisedb.com> <586106794.1549713.1633354360427@mail.yahoo.com> Cc: "pgsql-general@postgresql.org" From: Tomas Vondra Message-ID: <8c37c2e2-ed4d-ebd0-2b05-7c630133bf33@enterprisedb.com> Date: Mon, 4 Oct 2021 15:49:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <586106794.1549713.1633354360427@mail.yahoo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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