Re: Executing INSERTs from a file but with a wait delay. - Mailing list pgsql-novice

From Laurenz Albe
Subject Re: Executing INSERTs from a file but with a wait delay.
Date
Msg-id 248dbae08b024e035a3ef1811d20f8defa8f232c.camel@cybertec.at
Whole thread
In response to Executing INSERTs from a file but with a wait delay.  ("Subramanian,Ramachandran" <ramachandran.subramanian@alte-leipziger.de>)
Responses AW: Executing INSERTs from a file but with a wait delay.
List 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



pgsql-novice by date:

Previous
From: "Subramanian,Ramachandran"
Date:
Subject: Executing INSERTs from a file but with a wait delay.
Next
From: "Subramanian,Ramachandran"
Date:
Subject: AW: Executing INSERTs from a file but with a wait delay.