468,291 Members | 1,492 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,291 developers. It's quick & easy.

supressing NOTICE messages on Windows/cygwin only not working?

Hi,

I'm noticing NOTICE messages can't be turned off with my cygwin-based
platform. I've had other's confirm it works on linux.
Here is my session:

$ psql -U postgresql itn
Welcome to psql 7.4.5, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

postgresql@[local][itn]>SET client_min_messages TO error;
SET
postgresql@[local][itn]>SHOW client_min_messages;
client_min_messages
---------------------
error
(1 row)

postgresql@[local][itn]>CREATE TABLE foobar(
itn(# id INTEGER NOT NULL,
itn(# PRIMARY KEY (id)
itn(# );
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "foobar_pkey" for
table "foobar"
CREATE TABLE
postgresql@[local][itn]>SHOW client_min_messages;
client_min_messages
---------------------
error
(1 row)

postgresql@[local][itn]>

See anything wrong with what I did? There must be some setting I
haven't done. I'm on windows xp pro using the cygwin standard
install.

TIA

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #1
2 2294
Alex Soto <ap****@gmail.com> writes:
I'm noticing NOTICE messages can't be turned off with my cygwin-based
platform. I've had other's confirm it works on linux.


The SET will definitely turn off messages that the backend thinks it is
delivering to the client. However, it won't turn off logging of those
same messages in the postmaster log --- which may just be standard
error. Allow me to guess a couple things:

1. You originally launched the postmaster from the same terminal window
you are now running psql in, and you didn't do anything to redirect its
error log to a file or /dev/null or syslog or whatever.

2. Before you changed client_min_messages you were actually seeing *two*
copies of these messages, one sent through psql and one popping up
because you are reading the postmaster's stderr.

While you could make this go away by changing log_min_messages, a better
idea would be to redirect postmaster stderr someplace when you start it.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #2
Thanks Tom,

Embarassingly correct guesses. Thanks for the quick response.
On Tue, 07 Sep 2004 11:29:17 -0400, Tom Lane <tg*@sss.pgh.pa.us> wrote:
Alex Soto <ap****@gmail.com> writes:
I'm noticing NOTICE messages can't be turned off with my cygwin-based
platform. I've had other's confirm it works on linux.


The SET will definitely turn off messages that the backend thinks it is
delivering to the client. However, it won't turn off logging of those
same messages in the postmaster log --- which may just be standard
error. Allow me to guess a couple things:

1. You originally launched the postmaster from the same terminal window
you are now running psql in, and you didn't do anything to redirect its
error log to a file or /dev/null or syslog or whatever.

2. Before you changed client_min_messages you were actually seeing *two*
copies of these messages, one sent through psql and one popping up
because you are reading the postmaster's stderr.

While you could make this go away by changing log_min_messages, a better
idea would be to redirect postmaster stderr someplace when you start it.

regards, tom lane


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jp Calderone | last post: by
3 posts views Thread by Steve Holden | last post: by
2 posts views Thread by Aki Niimura | last post: by
1 post views Thread by Bill Grigg | last post: by
2 posts views Thread by Alex Soto | last post: by
4 posts views Thread by reachsamdurai | last post: by
2 posts views Thread by Wade Ward | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.