pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How compare current_setting(..) ?
3+ messages / 2 participants
[nested] [flat]

* How compare current_setting(..) ?
@ 2007-02-22 10:25 Sabin Coanda <sabin.coanda@deuromedia.ro>
  2007-02-22 11:03 ` Re: How compare current_setting(..) ? Michael Fuhr <mike@fuhr.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Sabin Coanda @ 2007-02-22 10:25 UTC (permalink / raw)
  To: pgsql-sql

Hi there,

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 ?

TIA,
Sabin 





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: How compare current_setting(..) ?
  2007-02-22 10:25 How compare current_setting(..) ? Sabin Coanda <sabin.coanda@deuromedia.ro>
@ 2007-02-22 11:03 ` Michael Fuhr <mike@fuhr.org>
  2007-02-22 13:47   ` Re: How compare current_setting(..) ? Sabin Coanda <sabin.coanda@deuromedia.ro>
  0 siblings, 1 reply; 3+ messages in thread

From: Michael Fuhr @ 2007-02-22 11:03 UTC (permalink / raw)
  To: Sabin Coanda <sabin.coanda@deuromedia.ro>; +Cc: 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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: How compare current_setting(..) ?
  2007-02-22 10:25 How compare current_setting(..) ? Sabin Coanda <sabin.coanda@deuromedia.ro>
  2007-02-22 11:03 ` Re: How compare current_setting(..) ? Michael Fuhr <mike@fuhr.org>
@ 2007-02-22 13:47   ` Sabin Coanda <sabin.coanda@deuromedia.ro>
  0 siblings, 0 replies; 3+ messages in thread

From: Sabin Coanda @ 2007-02-22 13:47 UTC (permalink / raw)
  To: pgsql-sql

Sorry, it was my fault. The setting was '%t' and a space. I fixed it and it 
works well.
Many thanks !

"Michael Fuhr" <mike@fuhr.org> wrote in message 
news:20070222110353.GA7197@winnie.fuhr.org...
> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>
> 





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2007-02-22 13:47 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-02-22 10:25 How compare current_setting(..) ? Sabin Coanda <sabin.coanda@deuromedia.ro>
2007-02-22 11:03 ` Michael Fuhr <mike@fuhr.org>
2007-02-22 13:47   ` Sabin Coanda <sabin.coanda@deuromedia.ro>

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