Re: Executing INSERTs from a file but with a wait delay.

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: "Subramanian,Ramachandran" <ramachandran(dot)subramanian(at)alte-leipziger(dot)de>, "pgsql-novice(at)lists(dot)postgresql(dot)org" <pgsql-novice(at)lists(dot)postgresql(dot)org>
Subject: Re: Executing INSERTs from a file but with a wait delay.
Date: 2026-04-14 10:58:07
Message-ID: 248dbae08b024e035a3ef1811d20f8defa8f232c.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tue, 2026-04-14 at 08:17 +0000, Subramanian,Ramachandran wrote:
> Let us say that I have 10 Insert statements in a file called  run_inserts.sql .
>  
> I run it with  psql -p 5432 -f run_inserts.sql.
>  
>  
> My wish is to find a way to execute it, but I want it to wait after each INSERT  till I hit Enter .
>  
>  
> I could use pg_sleep , but that is a preset value..  I want to make it wait indefinitely till I hit enter.
>  
> Is this even possible?  Thank you in advance for your help.

From the psql manual:

-s
--single-step
Run in single-step mode. That means the user is prompted before each command is sent to
the server, with the option to cancel execution as well. Use this to debug scripts.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Subramanian,Ramachandran 2026-04-14 11:04:21 AW: Executing INSERTs from a file but with a wait delay.
Previous Message Subramanian,Ramachandran 2026-04-14 08:17:12 Executing INSERTs from a file but with a wait delay.