Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UZFkG-00049e-Mh for pgsql-bugs@arkaria.postgresql.org; Mon, 06 May 2013 07:22:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UZFkG-0004yd-33 for pgsql-bugs@arkaria.postgresql.org; Mon, 06 May 2013 07:22:00 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UZFkF-0004yX-6K for pgsql-bugs@postgresql.org; Mon, 06 May 2013 07:21:59 +0000 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UZFk7-0000jq-57 for pgsql-bugs@postgresql.org; Mon, 06 May 2013 07:21:58 +0000 Received: from sc9-mailhost1.vmware.com (sc9-mailhost1.vmware.com [10.113.161.71]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id C598228468; Mon, 6 May 2013 00:21:49 -0700 (PDT) Received: from zcs-prod-ext-mta-1.vmware.com (zcs-prod-ext-mta-1.vmware.com [10.113.62.223]) by sc9-mailhost1.vmware.com (Postfix) with ESMTP id C25AD186EC; Mon, 6 May 2013 00:21:49 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id 3C218120034; Mon, 6 May 2013 00:26:49 -0700 (PDT) X-Virus-Scanned: amavisd-new at zcs-prod-ext-mta-1.vmware.com Received: from zcs-prod-ext-mta-1.vmware.com ([127.0.0.1]) by localhost (zcs-prod-ext-mta-1.vmware.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ipkza-N8CJW1; Mon, 6 May 2013 00:26:49 -0700 (PDT) Received: from zcs-prod-ext-mta-1.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id 0FA0A120033; Mon, 6 May 2013 00:26:49 -0700 (PDT) Received: from [192.168.1.90] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTPSA; Mon, 6 May 2013 00:26:48 -0700 (PDT) Message-ID: <51875A0A.5000407@vmware.com> Date: Mon, 06 May 2013 10:21:46 +0300 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: frank@heuveltop.nl CC: pgsql-bugs@postgresql.org Subject: Re: BUG #8135: current_setting('DateStyle'); does not reflect User setting References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -8.1 (--------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 05.05.2013 21:18, frank@heuveltop.nl wrote: > PostgreSQL version: 9.1.8 Not that it makes any difference for this issue, but you should upgrade to 9.1.9. > After > ALTER ROLE frank SET TimeZone = 'Europe/Amsterdam'; > > Where the TimeZone differs from the default timezone. > > SELECT current_setting('TimeZone'); > > Gives the correct answer. > > But this same doesn't work for DateStyle > > ALTER ROLE frank SET DateStyle = 'SQL, DMY'; > > Where the DateStyle differs from the default DateStyle > > SELECT current_setting('DateStyle'); > > Gives the system/database setting but not the user setting; while the > setting does have its effect on the output of date's and timestamps. This > might also effect other user settings, but I haven't found any yet. Works for me. Are you sure the value isn't being overridden by a per-database-and-role setting? You can use "select source from pg_settings where name='DateStyle'" to check where the currently effective value came from. - Heikki -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs