Unix Technical Forum

turning off notices

This is a discussion on turning off notices within the Pgsql General forums, part of the PostgreSQL category; --> Hi All, I'm having trouble with turning off notices. Within psql I use \set VERBOSITY terse, which is fine. ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 12:18 AM
Sue Fitt
 
Posts: n/a
Default turning off notices

Hi All,

I'm having trouble with turning off notices. Within psql I use \set VERBOSITY terse, which is fine. However, using psql -c I am having trouble. It seems I should be able to use psql -qc 'mycommand' but I am still getting notices output, e.g.

psql -d combilex -qc 'SELECT * FROM show(1135311);'
NOTICE: phonotactic error, please check transcription
CONTEXT: SQL statement "SELECT etc....

Is there a way to turn these notices off other than reconfiguring the conf file and restarting the database? I am using 8.1.3.

Any help appreciated,
Sue
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 12:18 AM
Pavel Stehule
 
Posts: n/a
Default Re: turning off notices

Hello

try:

echo '\set VERBOSITY terse\\SELECT * FROM show(1135311);' | psql -d combilex -q

Regards
Pavel Stehule

On 19/01/2008, Sue Fitt <sfitt@fittconway.plus.com> wrote:
>
>
> Hi All,
>
> I'm having trouble with turning off notices. Within psql I use \set
> VERBOSITY terse, which is fine. However, using psql -c I am having trouble.
> It seems I should be able to use psql -qc 'mycommand' but I am still getting
> notices output, e.g.
>
> psql -d combilex -qc 'SELECT * FROM show(1135311);'
> NOTICE: phonotactic error, please check transcription
> CONTEXT: SQL statement "SELECT etc....
>
> Is there a way to turn these notices off other than reconfiguring the conf
> file and restarting the database? I am using 8.1.3.
>
> Any help appreciated,
> Sue


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 12:18 AM
Sue Fitt
 
Posts: n/a
Default Re: turning off notices

Thanks, this is a help - it has turned off the CONTEXT part, but the NOTICE
is still there.

Just looked at the same query inside psql for comparison, with '\set
VERBOSITY terse', but actually I see that here I am getting both NOTICE and
CONTEXT. Not sure what's going on here...

Anyway, it's the NOTICE in psql -c that's mainly concerning me at the
moment. Ideas anyone, or can these notices not be turned off?


Sue

----- Original Message -----
From: "Pavel Stehule" <pavel.stehule@gmail.com>
To: "Sue Fitt" <sfitt@fittconway.plus.com>
Cc: <pgsql-general@postgresql.org>
Sent: Saturday, January 19, 2008 3:30 PM
Subject: Re: [GENERAL] turning off notices


> Hello
>
> try:
>
> echo '\set VERBOSITY terse\\SELECT * FROM show(1135311);' | psql -d
> combilex -q
>
> Regards
> Pavel Stehule
>
> On 19/01/2008, Sue Fitt <sfitt@fittconway.plus.com> wrote:
>>
>>
>> Hi All,
>>
>> I'm having trouble with turning off notices. Within psql I use \set
>> VERBOSITY terse, which is fine. However, using psql -c I am having
>> trouble.
>> It seems I should be able to use psql -qc 'mycommand' but I am still
>> getting
>> notices output, e.g.
>>
>> psql -d combilex -qc 'SELECT * FROM show(1135311);'
>> NOTICE: phonotactic error, please check transcription
>> CONTEXT: SQL statement "SELECT etc....
>>
>> Is there a way to turn these notices off other than reconfiguring the
>> conf
>> file and restarting the database? I am using 8.1.3.
>>
>> Any help appreciated,
>> Sue

>
> --
> This email has been verified as Virus free.
> Virus Protection and more available at http://www.plus.net
>



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 12:18 AM
Stephan Szabo
 
Posts: n/a
Default Re: turning off notices

On Sat, 19 Jan 2008, Sue Fitt wrote:

> Hi All,
>
> I'm having trouble with turning off notices. Within psql I use \set
> VERBOSITY terse, which is fine. However, using psql -c I am having
> trouble. It seems I should be able to use psql -qc 'mycommand' but I am
> still getting notices output, e.g.
>
> psql -d combilex -qc 'SELECT * FROM show(1135311);'
> NOTICE: phonotactic error, please check transcription
> CONTEXT: SQL statement "SELECT etc....
>
> Is there a way to turn these notices off other than reconfiguring the
> conf file and restarting the database? I am using 8.1.3.


If you want no notices, you could try "set client_min_messages TO
WARNING".

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-10-2008, 12:18 AM
Sue Fitt
 
Posts: n/a
Default Re: turning off notices

Thanks, a combination of the two answers solves it:

echo 'set client_min_messages TO WARNING; SELECT * FROM show(1135311);' |
psql -d combilex

Notices and their context now gone. Not sure why I had to use ';' rather
than '\\' to join the two statements, but it's working so I'm happy.

Sue

----- Original Message -----
From: "Stephan Szabo" <sszabo@megazone.bigpanda.com>
To: "Sue Fitt" <sfitt@fittconway.plus.com>
Cc: <pgsql-general@postgresql.org>
Sent: Saturday, January 19, 2008 4:16 PM
Subject: Re: [GENERAL] turning off notices


> On Sat, 19 Jan 2008, Sue Fitt wrote:
>
>> Hi All,
>>
>> I'm having trouble with turning off notices. Within psql I use \set
>> VERBOSITY terse, which is fine. However, using psql -c I am having
>> trouble. It seems I should be able to use psql -qc 'mycommand' but I am
>> still getting notices output, e.g.
>>
>> psql -d combilex -qc 'SELECT * FROM show(1135311);'
>> NOTICE: phonotactic error, please check transcription
>> CONTEXT: SQL statement "SELECT etc....
>>
>> Is there a way to turn these notices off other than reconfiguring the
>> conf file and restarting the database? I am using 8.1.3.

>
> If you want no notices, you could try "set client_min_messages TO
> WARNING".
>
> --
> This email has been verified as Virus free.
> Virus Protection and more available at http://www.plus.net
>



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org/

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:57 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com