Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C13759FBEB5 for ; Thu, 22 Feb 2007 07:04:17 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 21038-04-2 for ; Thu, 22 Feb 2007 07:04:12 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id CD5199FBECC for ; Thu, 22 Feb 2007 07:04:11 -0400 (AST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.8/8.13.8) with ESMTP id l1MB3spr007518 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 22 Feb 2007 04:03:57 -0700 (MST) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.8/8.13.8) with ESMTP id l1MB3sKu007376; Thu, 22 Feb 2007 04:03:54 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.8/8.13.8/Submit) id l1MB3s2V007375; Thu, 22 Feb 2007 04:03:54 -0700 (MST) (envelope-from mfuhr) Date: Thu, 22 Feb 2007 04:03:54 -0700 From: Michael Fuhr To: Sabin Coanda Cc: pgsql-sql@postgresql.org Subject: Re: How compare current_setting(..) ? Message-ID: <20070222110353.GA7197@winnie.fuhr.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.045 tagged_above=0 required=5 tests=AWL, BAYES_50, SPF_PASS X-Spam-Level: X-Archive-Number: 200702/219 X-Sequence-Number: 27553 On Thu, Feb 22, 2007 at 12:25:42PM +0200, Sabin Coanda wrote: > I'd like to check that my log_line_prefix is set to '%t'. > I suppose I can check it with the following statement: > SELECT current_setting( 'log_line_prefix' ) > WHERE current_setting( 'log_line_prefix' ) != '%t' > > But it returns every time a row, with '%t', even when log_line_prefix is set > to '%t'. > What's wrong ? Works here. Might log_line_prefix have leading or trailing spaces? What does the following return? SELECT '<' || current_setting('log_line_prefix') || '>', length(current_setting('log_line_prefix')); -- Michael Fuhr