From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | brian <brian(at)zijn-digital(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: log_statement and PREPARE |
Date: | 2007-09-07 01:17:47 |
Message-ID: | 8211.1189127867@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
brian <brian(at)zijn-digital(dot)com> writes:
> But that should mean that my prepared statement that contains an INSERT
> should be logged, yes? (8.1 issues notwithstanding)
> I ask because i've set log_statement to 'mod' but am not seeing any
> of my prepared statements in the log. INSERT, UPDATE, and friends i
> do see.
Hm, works for me:
regression=# create temp table fooey(f1 int);
CREATE TABLE
regression=# prepare foo(int) as insert into fooey values($1);
PREPARE
regression=# execute foo(42);
INSERT 0 1
regression=# show log_statement;
log_statement
---------------
mod
(1 row)
in log:
LOG: statement: create temp table fooey(f1 int);
LOG: statement: prepare foo(int) as insert into fooey values($1);
The same sequence in 8.2 logs:
LOG: statement: create temp table fooey(f1 int);
LOG: statement: prepare foo(int) as insert into fooey values($1);
LOG: statement: execute foo(42);
DETAIL: prepare: prepare foo(int) as insert into fooey values($1);
If what you were looking for was that the *execute* gets logged
dependent on what the prepared statement was, then you need 8.2.
All that stuff got rewritten pretty heavily for 8.2 ...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Glaesemann | 2007-09-07 01:20:08 | Re: Column as arrays.. more efficient than columns? |
Previous Message | Joshua D. Drake | 2007-09-07 01:10:34 | Call for Speakers PostgreSQL Conference Fall 2007 |