Re: [Spacewalk-devel] PGPORT: Checking psql Success From Shell Script

2009-01-29 Thread Devan Goodwin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 30 Jan 2009 02:18:51 +0530 Gurjeet Singh wrote: > Reading up on 'Exit Status' section in > http://www.postgresql.org/docs/8.3/static/app-psql.html shows that it > will return 3 if ON_ERROR_STOP was set, and it was run using a script. > > So

Re: [Spacewalk-devel] PGPORT: Checking psql Success From Shell Script

2009-01-29 Thread Devan Goodwin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thu, 29 Jan 2009 21:57:10 +0100 Jan Pazdziora wrote: > On Thu, Jan 29, 2009 at 04:01:40PM -0400, Devan Goodwin wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > Working on the population of PostgreSQL schema in > > spacewalk-se

Re: [Spacewalk-devel] PGPORT: Checking psql Success From Shell Script

2009-01-29 Thread Jan Pazdziora
On Thu, Jan 29, 2009 at 04:01:40PM -0400, Devan Goodwin wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Working on the population of PostgreSQL schema in > spacewalk-setup I landed in rhn-populate-database.pl, got the > script ready to populate pgsql schema as well but even if the > s

Re: [Spacewalk-devel] PGPORT: Checking psql Success From Shell Script

2009-01-29 Thread Gurjeet Singh
Reading up on 'Exit Status' section in http://www.postgresql.org/docs/8.3/static/app-psql.html shows that it will return 3 if ON_ERROR_STOP was set, and it was run using a script. So I guess you need to do it as: my $psql_cmd = "PGPASSWORD=" . $password . " psql -U " . $user . " -h " . $host . "

[Spacewalk-devel] PGPORT: Checking psql Success From Shell Script

2009-01-29 Thread Devan Goodwin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Working on the population of PostgreSQL schema in spacewalk-setup I landed in rhn-populate-database.pl, got the script ready to populate pgsql schema as well but even if the schema population fails miserably, the psql executable returns a 0 success cod