From: Tomonari Katsumata <katsumata.tomonari@po.ntts.co.jp>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #11350: ALTER SYSTEM is not DDL?
Date: Fri, 05 Sep 2014 10:30:34 +0900
Message-ID: <5409123A.5070502@po.ntts.co.jp> (raw)
In-Reply-To: <20140904201248.GE3625@alap3.anarazel.de>
References: <20140904051356.2926.42797@wrigleys.postgresql.org>
<CAA4eK1JOajg2Rt7pQyE7rq31e4ESzzCfcjHpG2LdGim-y9zB=g@mail.gmail.com>
<20140904191456.GW16422@tamriel.snowman.net>
<20140904201248.GE3625@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Hi,
Thank you for checking this.
Originally this feature might have been close to SET,
but currently has an 'ALTER' keyword.
Many users don't know this and would be confusing with reading the manual.
I made a quick patch for fixing this.
Could you check it?
regards,
-------------
Tomonari Katsumata
(2014/09/05 5:12), Andres Freund wrote:
> On 2014-09-04 15:14:56 -0400, Stephen Frost wrote:
>> * Amit Kapila (amit.kapila16@gmail.com) wrote:
>>> On Thu, Sep 4, 2014 at 10:43 AM, <katsumata.tomonari@po.ntts.co.jp>
wrote:
>>>> So I think log message should be outputted when executing ALTER SYSTEM
>>> with
>>>> 'log_statement = ddl'.
>>>>
>>>> Am I missing something?
>>>
>>> Currently it is considered similar to SET statement as it performs
>>> similar operation except that the value for configuration gets set
>>> in configuration file. Do you see any reason for it to be considered
>>> differently except that the command has ALTER keyword?
>>
>> Uh, it's nothing like SET as SET only affects the current session.
>>
>> It's much, much closer to ALTER ROLE, which correctly logs at the DDL
>> level. This should be fixed, and before 9.4 goes out...
>
> +1.
>
> Greetings,
>
> Andres Freund
>
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugsAttachments:log_statement_with_alter_system.patch (text/x-patch, 348B) downloaddiff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.cindex f648945..6185863 100644--- a/src/backend/tcop/utility.c+++ b/src/backend/tcop/utility.c@@ -2733,7 +2733,7 @@ GetCommandLogLevel(Node *parsetree)
break;
case T_AlterSystemStmt:
- lev = LOGSTMT_ALL;+ lev = LOGSTMT_DDL;
break;
case T_VariableSetStmt:
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: katsumata.tomonari@po.ntts.co.jp
Subject: Re: BUG #11350: ALTER SYSTEM is not DDL?
In-Reply-To: <5409123A.5070502@po.ntts.co.jp>
References: <20140904051356.2926.42797@wrigleys.postgresql.org> <CAA4eK1JOajg2Rt7pQyE7rq31e4ESzzCfcjHpG2LdGim-y9zB=g@mail.gmail.com> <20140904191456.GW16422@tamriel.snowman.net> <20140904201248.GE3625@alap3.anarazel.de> <5409123A.5070502@po.ntts.co.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox