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

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Executing INSERTs from a file but with a wait delay.
Дата
Msg-id 248dbae08b024e035a3ef1811d20f8defa8f232c.camel@cybertec.at
обсуждение
Ответ на Executing INSERTs from a file but with a wait delay.  ("Subramanian,Ramachandran" <ramachandran.subramanian@alte-leipziger.de>)
Ответы AW: Executing INSERTs from a file but with a wait delay.
Список 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 по дате отправления: