Subject: Wich program generates "list index out of range" ? pgadmin or the server ?

From: intmail01 <[email-masked]>
Date: Tue, 19 Dec 2023 11:26:46 +0300

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 ?

Thanks

---

From: Steve Midgley <[email-masked]>
Date: Tue, 19 Dec 2023 08:50:34 -0800

On Tue, Dec 19, 2023 at 12:23 AM intmail01 <[email-masked]> wrote:

> 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

---

From: hubert depesz lubaczewski <[email-masked]>
Date: Wed, 20 Dec 2023 11:26:05 +0100

> Could someone tell me which program is responsible of this message, pgadmin

Connect with psql, and generate the same problem (same inserts).

And you will know if the server is returning it.

For what it's worth, in pg sources there is just one please where the
phrase "list index out of range" exists, and it's in tests of plpython
code. So, perhaps you have some trigger in plpython?

Best regards,

depesz

---

From: intmail01 <[email-masked]>
Date: Thu, 21 Dec 2023 14:46:53 +0300

Hi,

I try an insert clause with psql command and there is no error.
I use also libreoffice base interface and it works.
The Pgadmin command line works fine too.
The only failed interface is the Pgadmin array.  It shows "list index out
of range" for insertion in the array.

Best regards.

---

From: hubert depesz lubaczewski <[email-masked]>
Date: Thu, 21 Dec 2023 13:13:58 +0100

> of range" for insertion in the array.

That kinda answers the question about "which program generates...",
doesn't it?

Best regards,

depesz