Re: Problem with DEBUG messages

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Michael Shapiro <mshapiro51(at)gmail(dot)com>
Cc: Dinesh Kumar <dinesh(dot)kumar(at)enterprisedb(dot)com>, "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Problem with DEBUG messages
Date: 2013-04-10 12:38:04
Message-ID: CA+OCxoytfOK6H=FviSWS1tUtWSwb1jMOWO5dEhqTtbNn-PCfVA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Tue, Apr 9, 2013 at 5:00 PM, Michael Shapiro <mshapiro51(at)gmail(dot)com> wrote:
> Yes and no.
>
> If I run the script that creates the function, does the set
> client_min_messages, then runs the function,
> I get the DEBUG.
>
> But then if I just runt he function (in a new query window). I do not get
> the DEBUG messages.
>
> However, if I add
>
> SET client_min_messages to 'DEBUG';
>
> in the query window before I run the function, I see the messages.
>
> So
>
> select test_debug(1)
>
> doesn't work, but
>
>
> SET client_min_messages to 'DEBUG';
> select test_debug(1)
>
> does work,

After digging a bit further, this appears to be because pgAdmin's
connection management class runs this when it establishes a new
connection:

SET DateStyle=ISO;\nSET client_min_messages=notice;

in order to ensure that things are set up as expected. So, I'd suggest
just resetting client_min_messages if necessary when opening a query
window.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-support by date

  From Date Subject
Next Message James Woods 2013-04-10 13:28:47 Re: Post Installation PostgreSQL
Previous Message Dave Page 2013-04-10 12:03:12 Re: Password Expiry