Re: Transaction issue

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Transaction issue
Date: 2024-06-19 20:57:48
Message-ID: CANzqJaDFgsgyvG7y8Y6SOEFSJTrvmMT3mZz=5QiRfU7T1Muayg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jun 19, 2024 at 4:33 PM Rich Shepard <rshepard(at)appl-ecosys(dot)com>
wrote:

> On Wed, 19 Jun 2024, Alban Hertroys wrote:
>
> > The error prior to those statements is what you need to look at. That’s
> > what’s causing the transaction to fail.
>
> Alban/Adrian,
>
> > I get the impression that you’re executing shell scripts that run the
> psql
> > command-line utility.
>
> That's what I do as I've not taken the time to finish the GUI with TKinter.
>
> Here's the latest example:
> bustrac=# \i insert-law-offices-addr.sql
> psql:insert-law-offices-addr.sql:1: ERROR: current transaction is
> aborted, commands ignored until end of transaction block
> psql:insert-law-offices-addr.sql:69: ERROR: current transaction is
> aborted, commands ignored until end of transaction block
>
> Line 1 is the BEGIN; statement; line 69 is the last row of data to be
> inserted.
>

The problem is that you don't know where it's failing.

I suggest you run "\echo all" before running "\i
insert-law-offices-addr.sql". That way, you'll see which line it barfs on.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2024-06-19 21:02:19 Re: Transaction issue
Previous Message Rich Shepard 2024-06-19 20:54:35 Re: Transaction issue