Search Postgresql Archives

Re: log_statement and PREPARE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



brian <brian@xxxxxxxxxxxxxxxx> 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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux