remove log header

Started by Sabin Coandaover 17 years ago3 messagesgeneral
Jump to latest
#1Sabin Coanda
sabin.coanda@deuromedia.ro

Hi there,

On Windows, I run a script batch file with psql, and I get any log line with
the following pattern:

psql://<path_file_name>:4: NOTICE: <log_message>

I'd like to remove the log header before NOTICE. What should I do ?

Thanks,
Sabin

#2Grzegorz Jaśkiewicz
gryzman@gmail.com
In reply to: Sabin Coanda (#1)
Re: remove log header

On Tue, Jan 6, 2009 at 3:32 PM, Sabin Coanda <sabin.coanda@deuromedia.ro> wrote:

Hi there,

On Windows, I run a script batch file with psql, and I get any log line with
the following pattern:

psql://<path_file_name>:4: NOTICE: <log_message>

I'd like to remove the log header before NOTICE. What should I do ?

either write simple program for that, or install gnu utils and treat
it with "sed"

--
GJ

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Sabin Coanda (#1)
Re: remove log header

"Sabin Coanda" <sabin.coanda@deuromedia.ro> writes:

On Windows, I run a script batch file with psql, and I get any log line with
the following pattern:
psql://<path_file_name>:4: NOTICE: <log_message>
I'd like to remove the log header before NOTICE. What should I do ?

If you don't want line numbers at all, I think you can do

psql database <scriptfile

so that psql doesn't know it's a script.

regards, tom lane