Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 593C59FB5DB for ; Thu, 25 Jan 2007 09:21:35 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 55939-06 for ; Thu, 25 Jan 2007 09:21:20 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 0020E9FB478 for ; Thu, 25 Jan 2007 09:21:30 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mail.finestmedia.ee (mail.finestmedia.ee [213.180.31.2]) by svr4.postgresql.org (Postfix) with ESMTP id 695F55AFAE8 for ; Thu, 25 Jan 2007 13:21:30 +0000 (GMT) Received: from [192.168.2.19] (err.fm.sise [192.168.2.19]) by mail.finestmedia.ee (Postfix) with ESMTP id EF74133FFB2 for ; Thu, 25 Jan 2007 15:21:24 +0200 (EET) Message-ID: <45B8AED5.3090905@finestmedia.ee> Date: Thu, 25 Jan 2007 15:21:25 +0200 From: Rigmor Ukuhe User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: Logging just SQL commands in an SQL script format References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/243 X-Sequence-Number: 24399 Campbell, Lance wrote: > I want to log all SQL commands as an executable script file for use in > performance testing. Currently there is a lot of information in the log > that is generated that would not be executable. Below is an example of > what I would want to see; which is just the SQL. > > > > Example of log output: > > Select a,b,c from calendar where a=12; > > Select a,b,c from calendar where a=13; > > Hi, Wouldn't SQL statements in log possible be out of order, also transaction info would be missing? Even if you do it in application-side, logging query start time and transaction info, and feed this data to some application that starts to excecute them in correct time and context, you wouldnt be able to reliably replicate exact behavior, cause configuration change might change query times too much. But i see it _can_ be useful in some cases. Rigmor > > > > How do I do this? > > > > Thanks, > > > > > > > > Lance Campbell > > Project Manager/Software Architect > > Web Services at Public Affairs > > University of Illinois > > 217.333.0382 > > http://webservices.uiuc.edu > > > > !DSPAM:5,45b7c785287772091230466! -- Rigmor Ukuhe Finestmedia Ltd | Software Development Team Manager gsm : (+372)56467729 | tel : (+372)6558043 | e-mail : rigmor.ukuhe@finestmedia.ee