Thread: BEGIN/END in SQL generated by pgAdmin ERD command

BEGIN/END in SQL generated by pgAdmin ERD command

From
Marc Linster
Date:
When I ask pgAdmin 9.4 to generate SQL from the ERD window, it wraps 'BEGIN;' and 'END;' around the set of statements, instead of 'BEGIN;/COMMIT;'.

This is for pgAdmin 9.4 on Sequoia 15.5

Am I missing something?

Thanks, Marc
---------------------------------------
Marc Linster; Marc@MarcLinster.com; 
+352 621 430 156

Re: BEGIN/END in SQL generated by pgAdmin ERD command

From
Dave Page
Date:
Hi

On Mon, 2 Jun 2025 at 15:30, Marc Linster <marc@marclinster.com> wrote:
When I ask pgAdmin 9.4 to generate SQL from the ERD window, it wraps 'BEGIN;' and 'END;' around the set of statements, instead of 'BEGIN;/COMMIT;'.

This is for pgAdmin 9.4 on Sequoia 15.5

Am I missing something?

END is the same as COMMIT, albeit PostgreSQL specific and not part of the SQL standard.


It would probably be nice to change it to COMMIT if someone felt inclined, but it's not a bug. 

--

Re: BEGIN/END in SQL generated by pgAdmin ERD command

From
Marc Linster
Date:
Thanks Dave - I had an error message, but it turned out that was related to my code.

M.
---------------------------------------
Marc Linster; Marc@MarcLinster.com; 
+352 621 430 156


On Mon, Jun 2, 2025 at 4:46 PM Dave Page <dpage@pgadmin.org> wrote:
Hi

On Mon, 2 Jun 2025 at 15:30, Marc Linster <marc@marclinster.com> wrote:
When I ask pgAdmin 9.4 to generate SQL from the ERD window, it wraps 'BEGIN;' and 'END;' around the set of statements, instead of 'BEGIN;/COMMIT;'.

This is for pgAdmin 9.4 on Sequoia 15.5

Am I missing something?

END is the same as COMMIT, albeit PostgreSQL specific and not part of the SQL standard.


It would probably be nice to change it to COMMIT if someone felt inclined, but it's not a bug. 

--