Turning Off PotgrSQL Output Messages - Mailing list pgsql-general

From Behzad Mahini
Subject Turning Off PotgrSQL Output Messages
Date
Msg-id 5122464168183D4FAB69535A590159C96EDE69@us-red-corp1.monosphere.com
Whole thread Raw
List pgsql-general

I have tried different options to turnoff the output mode of psql (turning off the STDERR & STDOUT and redirecting it to another file), and I have not been successful. The steps I have taken to capture the output of my script in an output file using the ‘\o’ option, are as follows:

 

# \o error_log \i script.sql

 

To provide more background, I have a wrapper “sql” code that launches a few other “sql” scripts, and I start it as follows at the PSQL level:

 

 

# \o wrapper_log_out \i wrapper.sql

 

Within the wrapper.sql script, I have the following lines (which unsuccessfully attempt to turnoff PostgreSQLcapture scripts:

 

\o createTable_log_out   \i createTableScript

\o insertTable_log_out    \i insertTableScript

 

…as it is obvious, I have placed all of my Table creations within the “createTableScript”, and all of my insert statements in the “insertTableScript”. Incidentally, initially within the ‘wrapper.sql’ script all I had were the following lines, and that option did not work either:

 

\i  createTableScript

\i  insertTableScript

 

 

Any suggestions as to how to go about this issue?

 

Thanks,

Behzad

 

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: No PUBLIC access by default?
Next
From: CSN
Date:
Subject: Re: plphp: PHP Warning: Call-time pass-by-reference has been deprecated