Josh Berkus <josh(at)agliodbs(dot)com> writes:
>> What would we like the postgresql.conf option to be? I was thinking
>> log_statements_as_inserts = (t/f)
> log_destination = 'inserts' #not a new GUC!
That seems a bit bizarre to me. The facility isn't a new log
destination; what it is is a different way of formatting what's
sent to the log.
> insert_columns = '%u,%d,%r,%p, ... %$'
> #this new GUC would define a list of comma-seperated columns as escape codes
> defined via the same code set as log_line_prefix. The only change would be
> the addition of %$, which would symbolize the "statement" being logged.
I think what you'd probably really want to write is something like
log_message_format = 'INSERT INTO mytab VALUES(%this, %that, ...);'
the point being that otherwise we'll need yet another GUC var to determine
the table name used in the INSERT. With a suitable set of escape codes
we could probably arrange for the existing behavior to correspond
to a particular value of log_message_format, and then there isn't
anything weird going on here; you are just changing away from a default
I wonder whether this could be defined in a way that lets it replace
log_line_prefix ... otherwise we have to think about the interaction of
the two facilities.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Merlin Moncure||Date: 2005-03-03 19:47:59|
|Subject: unexpected and reproducable crash in pl/pgsql function|
|Previous:||From: Josh Berkus||Date: 2005-03-03 17:24:05|
|Subject: Re: logging as inserts|