Re: [ADMIN] Script terminates even though ON_ERROR_STOP not set

2005-01-15 Thread Bradley Kieser
$ psql --version psql (PostgreSQL) 7.4.1 contains support for command-line editing # SELECT version(); version - PostgreSQL 7.4.1 on i686-pc-linux-

Re: [ADMIN] Script terminates even though ON_ERROR_STOP not set

2005-01-14 Thread Michael Fuhr
On Fri, Jan 14, 2005 at 06:11:27PM +, Bradley Kieser wrote: > Okay, Michael gets that trophy! Thanks Michael, it needed a commit. > However, this is odd. I get a "No transaction in progress" error coming > out on the commit, but at least it works, so I am happy! What version of the client an

Re: [ADMIN] Script terminates even though ON_ERROR_STOP not set

2005-01-14 Thread Bradley Kieser
Michael, I didn't see the last comment in my previous replies. I know that the variable isn't set because I embedded \set into the psql commands so that they would output what is set. Thanks, Brad Michael Fuhr wrote: On Fri, Jan 14, 2005 at 12:03:02PM +, Bradley Kieser wrote: I have an ad

Re: [ADMIN] Script terminates even though ON_ERROR_STOP not set

2005-01-14 Thread Bradley Kieser
Okay, Michael gets that trophy! Thanks Michael, it needed a commit. However, this is odd. I get a "No transaction in progress" error coming out on the commit, but at least it works, so I am happy! Thank you! This works: psql -U$dba $db << END drop schema $repschema cascade; commit; create schema

Re: [ADMIN] Script terminates even though ON_ERROR_STOP not set

2005-01-14 Thread Bradley Kieser
Michael Fuhr wrote: On Fri, Jan 14, 2005 at 12:03:02PM +, Bradley Kieser wrote: I have an admin script that drops a schema and then recreates it (quick way to refresh from backup). However, if the schema doesn't exist, the drop errors, as you would expect. The next SQL command, the schema

Re: [ADMIN] Script terminates even though ON_ERROR_STOP not set

2005-01-14 Thread Michael Fuhr
On Fri, Jan 14, 2005 at 12:03:02PM +, Bradley Kieser wrote: > I have an admin script that drops a schema and then recreates it (quick > way to refresh from backup). However, if the schema doesn't exist, the > drop errors, as you would expect. The next SQL command, the schema > create, is ne

[ADMIN] Script terminates even though ON_ERROR_STOP not set

2005-01-14 Thread Bradley Kieser
I have an admin script that drops a schema and then recreates it (quick way to refresh from backup). However, if the schema doesn't exist, the drop errors, as you would expect. The next SQL command, the schema create, is never executed. I do not have ON_ERROR_STOP set so why is this happening?