in reply to Re: validating SQL using DBI
in thread validating SQL using DBI

Yes, PostgreSQL does transactional DDL, see this page for an example. It is a handy feature but as you can see from that page, not widely implemented.

It lets you try out changes (adding or dropping indexes, for instance) and evaluating their effects, before actually COMMITting them (or ROLLBACK, as the case may be). (Other sessions are not effected.)

See also the -1 option of psql (the cli client):

        -1 ("one")      execute command file as a single transaction