Josh Berkus <josh@agliodbs.com> writes: >> What would we like the postgresql.conf option to be? I was thinking >> log_statements_as_inserts = (t/f)
> Nope. > 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 format. 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 ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend