Re: How compare current_setting(..) ?

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Sabin Coanda <sabin(dot)coanda(at)deuromedia(dot)ro>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: How compare current_setting(..) ?
Date: 2007-02-22 11:03:54
Message-ID: 20070222110353.GA7197@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Rafa Comino 2007-02-22 11:20:12 Esay question, about the numeric format
Previous Message Sabin Coanda 2007-02-22 10:25:42 How compare current_setting(..) ?