Re: Add support for logging the current role

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add support for logging the current role
Date: 2011-01-15 01:44:40
Message-ID: 20110115014439.GV4933@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> > If you have a format string, what do you want to do with the bits of the
> > format that aren't field references?
>
> I was thinking of it as being strictly a field list. I don't know
> whether it's really practical to borrow log_line_prefix's one-character
> names for the fields (for one thing, there would need to be names for
> all the existing CSV columns, not all of which equate to log_line_prefix
> escapes);

I'm not really happy about the idea that you can only get certain
information in a log file if you use CSV format. I also don't know
that there's really any particular reason log_line_prefix's names
have to be one character.

> but in any case anything other than field references would be
> disallowed. If you prefer to use a name list as the syntax that's fine
> with me.

I do like the idea of having just a field list though, to keep things
simple for the CSV users, and we could also pre-process the list into
flag variables or a bitmask or similar to be able to quickly check if a
certain field should be included or not. I'm not really keen about how
log_line_prefix currently parses the direct user-provided syntax every
time; strikes me as inefficient.

Thanks,

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-01-15 01:54:51 Re: Fixing GIN for empty/null/full-scan cases
Previous Message Robert Haas 2011-01-15 01:41:14 Re: Add support for logging the current role