Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rFdJ1-00B4GO-8D for pgsql-sql@arkaria.postgresql.org; Tue, 19 Dec 2023 16:50:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rFdIx-003Qq8-Ja for pgsql-sql@arkaria.postgresql.org; Tue, 19 Dec 2023 16:50:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rFdIx-003Qq0-7I for pgsql-sql@lists.postgresql.org; Tue, 19 Dec 2023 16:50:51 +0000 Received: from mail-lf1-f52.google.com ([209.85.167.52]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rFdIu-00BCRE-Jx for pgsql-sql@lists.postgresql.org; Tue, 19 Dec 2023 16:50:49 +0000 Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-50e3c6f1c10so3113603e87.1 for ; Tue, 19 Dec 2023 08:50:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703004647; x=1703609447; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=K7cluJyxRlmHLWwBk4n4ItHww6ae/m2+AyESLE6wNqM=; b=ZmYgGNzugAV2yTNV5AC8rHAWQqXzC8iY2yc9e+2MLsE7a4uQZqntvWPnuGTpLtzRJT mzcQD3qKLRVSVMjNw3hq4nLka7ya3ge3lqtyiOcsmJjUOGQUQlFvYssy6BK4u/T7KZSI EpUTIXZUb1Q2+Vmkf0L8vO0Pgt+PyKvE467PH1N8HtKpPhB26kFD+glm5327IAsiRUNQ NPjmdrFowkPED8MEuznguCXjtOwDTfOCGZEVBk40K3MGu3vVtd+7X7EO0MmUZuI3VkXh PhtC8cKLRdOCLyvw1/rBgBkKuocNc5dfRDptyYnuwJvxMW9ub6Rkzh+YPH7aMXRceJtV 9sWA== X-Gm-Message-State: AOJu0Yxj+KA8uuC56yMvE3xhnauLrGuxJ9k6uk1SuSNs+YV+0AgtZhZ6 +uuAs+OXgzhLCVyz5F1UfVb6i/VYoSwA9g== X-Google-Smtp-Source: AGHT+IFve8eEk+4eKjyo6XYmrRIx9NWxdI+iPCYtB3asKysTNSUp8Eo8lGqrR2BEh7eBf3GEB5XlDw== X-Received: by 2002:a05:6512:34d0:b0:50e:3082:1afe with SMTP id w16-20020a05651234d000b0050e30821afemr1012171lfr.22.1703004646573; Tue, 19 Dec 2023 08:50:46 -0800 (PST) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com. [209.85.221.48]) by smtp.gmail.com with ESMTPSA id tg9-20020a1709078dc900b00a22f4736312sm9076976ejc.129.2023.12.19.08.50.44 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Dec 2023 08:50:44 -0800 (PST) Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-3366ddd1eddso2092683f8f.0 for ; Tue, 19 Dec 2023 08:50:44 -0800 (PST) X-Received: by 2002:a5d:48c1:0:b0:333:3f93:a3c with SMTP id p1-20020a5d48c1000000b003333f930a3cmr4515708wrs.36.1703004643755; Tue, 19 Dec 2023 08:50:43 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Steve Midgley Date: Tue, 19 Dec 2023 08:50:34 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Wich program generates "list index out of range" ? pgadmin or the server ? To: intmail01 Cc: pgsql-sql@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000d793be060cdfaace" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000d793be060cdfaace Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Dec 19, 2023 at 12:23=E2=80=AFAM intmail01 wr= ote: > Hi, > > My db have some complex triggers and it failed when inserting line. > I use Pgadmin and it display message "list index out of range". > Could someone tell me which program is responsible of this message, > pgadmin or the remote server ? > > I'm not sure where it's coming from but it likely means that your query is not returning any results, or a subquery is not returning results. Pgadmin itself won't care if your resultset is zero rows, but something internal to your query could be causing this. I'm guessing your complex triggers or related insert statement is dependent on a value which is not being returned as needed. But others here with deeper expertise may have better input for you. For me, I'd recommend trying to examine the different pieces of the trigger function and the insert function separately to try to locate the source more precisely.. Steve --000000000000d793be060cdfaace Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Dec 19, 2023 at 12:23=E2=80=AFAM intmail01 <intmail01@gmail.com> wrote:
Hi,

My= db have some complex triggers and it failed when inserting line.
I use = Pgadmin and it display message "list index out of range".
Coul= d someone tell me which program is responsible of this message, pgadmin or = the remote server ?


I'm n= ot sure where it's coming from but it likely means that your query is n= ot returning any results, or a subquery is not returning results. Pgadmin i= tself won't care if your resultset is zero rows, but something internal= to your query could be causing this. I'm guessing your complex trigger= s or related insert statement is dependent on a value which is not being re= turned as needed. But others here with deeper expertise may have better inp= ut for you. For me, I'd recommend trying to examine the different piece= s of the trigger function and the insert function separately to try to loca= te the source more precisely..

Steve
--000000000000d793be060cdfaace--