[GENERAL] Rollback on include error in psql

2014-12-28 Thread Viktor Shitkovskiy
Hello. I'm trying to execute an sql script file in a single transation. The file contains includes for some other scripts which in my example create some tables. It looks like this: \include ../tables/table1.cre \include ../tables/table2.cre ... \include ../tables/table10.cre I'm

Re: [GENERAL] Rollback on include error in psql

2014-12-28 Thread Viktor Shitkovskiy
; and end with COMMIT;? eg: BEGIN; \include ../tables/table1.cre \include ../tables/table2.cre ... \include ../tables/table10.cre COMMIT; On Sun, Dec 28, 2014 at 3:02 AM, Viktor Shitkovskiy hanksm...@gmail.com wrote: Hello. I'm trying to execute an sql script file in a single transation

Re: [GENERAL] Rollback on include error in psql

2014-12-28 Thread Viktor Shitkovskiy
I include my own scripts. Each of them creates some table or makes some changes to existing tables. Yes, I want a complete rollback. Where is the \include coming from? What is in the tableX.cre files? So if I am following you want a complete rollback on non-SQL or SQL errors, correct?

Re: [GENERAL] Rollback on include error in psql

2014-12-28 Thread Viktor Shitkovskiy
So should I report a bug somewhere? As a workaround I'm currently using a wrapper bash script that parses the source psql script and checks if the 'include' and 'copy-from' files do really exist. On Mon, Dec 29, 2014 at 4:04 AM, David G Johnston david.g.johns...@gmail.com wrote: I would