Re: Transaction issue

Поиск
Список
Период
Сортировка
От Ron Johnson
Тема Re: Transaction issue
Дата
Msg-id CANzqJaCtycs55AXMtY+eVGLoEeARKKUq_7qVPJXyTuM2hi45Cg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Transaction issue  (Rich Shepard <rshepard@appl-ecosys.com>)
Список pgsql-general
On Wed, Jun 19, 2024 at 4:54 PM Rich Shepard <rshepard@appl-ecosys.com> wrote:
On Wed, 19 Jun 2024, Adrian Klaver wrote:

> Looks to me you have a left over unresolved transaction in your psql session.
> The easiest solution if that is the case is to exit the session and start a
> new session to run the script.

Adrian, et al.:

That's what I've done. This time I commented out the BEGIN; line:
bustrac=# \i insert-law-offices-addr.sql
INSERT 0 66

There are no errors in the file but when I tried running it as a transaction
it failed.

I have not before used transactions when inserting or updating tables; I'm
surprised that starting the transaction from the psql command line chokes
the attempt.
 
It doesn't.  The rest of us have successfully done it before.  You're Doing Something Wrong.  Don't know what, but you're doing it. Happens to ALL OF US, and is why "\echo all" and "psql -a" were developed.

So we can see WTH we screwed up, and then fix it.

В списке pgsql-general по дате отправления:

Предыдущее
От: Ron Johnson
Дата:
Сообщение: Re: Transaction issue
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Transaction issue