Re: Big script execution

2025-03-11 Thread Christophe Pettus
> On Mar 10, 2025, at 09:35, Igor Korot wrote: > > Will the tables also be deleted? > The CREATE TABLE statements are part of this big transaction. Yes. DDL is transactional in PostgreSQL just like DML.

Re: Big script execution

2025-03-11 Thread Laurenz Albe
On Mon, 2025-03-10 at 16:42 -0500, Igor Korot wrote: > I am trying to execute a huge script (~40K lines) that will populate > my database. > > The script starts with "BEGIN TRANSACTION" and will end > with "COMMIT". > > however I'd like to rollback if there is an error encounter. > > When I exec

Big script execution

2025-03-11 Thread Igor Korot
Hi, ALL, I am trying to execute a huge script (~40K lines) that will populate my database. The script starts with "BEGIN TRANSACTION" and will end with "COMMIT". however I'd like to rollback if there is an error encounter. When I execute it from the Terminal I do use -v ON_ERROR_STOP=1 but I'd

Re: Big script execution

2025-03-11 Thread Igor Korot
Hi, Laurenz, On Mon, Mar 10, 2025, 11:31 AM Laurenz Albe wrote: > On Mon, 2025-03-10 at 16:42 -0500, Igor Korot wrote: > > I am trying to execute a huge script (~40K lines) that will populate > > my database. > > > > The script starts with "BEGIN TRANSACTION" and will end > > with "COMMIT". > >

Re: Big script execution

2025-03-11 Thread Igor Korot
Thank you! On Mon, Mar 10, 2025, 11:37 AM Christophe Pettus wrote: > > > > On Mar 10, 2025, at 09:35, Igor Korot wrote: > > > > Will the tables also be deleted? > > The CREATE TABLE statements are part of this big transaction. > > Yes. DDL is transactional in PostgreSQL just like DML. >