Skip site navigation (1) Skip section navigation (2)

Re: logging statement levels

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Postgresql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: logging statement levels
Date: 2004-03-31 02:42:11
Message-ID: 200403310242.i2V2gB000840@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Andrew Dunstan wrote:
> I wrote:
> 
> >
> >
> > If nobody is working on this I am prepared to look at it:
> >
> > . Allow logging of only data definition(DDL), or DDL and modification 
> > statements
> >
> 
> 
> 
> Here are some options:
> 
> 1. change the type of "log_statement" option from boolean to string, 
> with allowed values of "all, mod, ddl, none" with default "none".
> 2. same as 1. but make boolean true values synonyms for "all" and 
> boolean false values synonyms for "none".
> 3. keep "log_statement" option as now and add a new option 
> "log_statement_level" with the same options as 1. but default to "all", 
> which will have no effect unless "log_statement" is true.

I like 1.

> Also, I assume "modification statements" means insert/update/delete, or 

Yes.

> are we talking about DDL mods (like "alter table")?

Alter is DDL.

> Finally, what about functions that have side effects? It would be nice 
> to be able to detect the statements to be logged at the syntactic level, 
> but it strikes me that that might not be possible.

Not possible.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-hackers by date

Next:From: Fabien COELHODate: 2004-03-31 06:43:15
Subject: Re: with vs without oids in pg_catalog.*
Previous:From: Christopher Kings-LynneDate: 2004-03-31 01:36:36
Subject: Re: pg_dump end comment

pgsql-patches by date

Next:From: Bruce MomjianDate: 2004-03-31 04:46:11
Subject: Re: [GENERAL] psql's "\d" and CLUSTER
Previous:From: Christopher Kings-LynneDate: 2004-03-31 01:36:36
Subject: Re: pg_dump end comment

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group