Re: COPY-able sql log outputs - Mailing list pgsql-patches

From Russell Smith
Subject Re: COPY-able sql log outputs
Date
Msg-id 46135B9D.1050403@pws.com.au
Whole thread Raw
In response to Re: COPY-able sql log outputs  ("FAST PostgreSQL" <fastpgs@fast.fujitsu.com.au>)
Responses Re: COPY-able csv log outputs
List pgsql-patches
FAST PostgreSQL wrote:
On Wed, 4 Apr 2007 02:26, Andrew Dunstan wrote:

I am currently doing the following modifications to the patch as per the 
review comments.

1. Changing all references to 'sqllog' or 'sql' to 'csvlog' and 'csv' 
respectively.
2. Escaping the username and databasename
3. Constructing the csvlog filename using log_filename instead of strcat.
4. General code optimization. 

Any other changes required ? ?  
Function additions like get_timestamp need more comments, or better comments "returns the timestamp", which timestamp?


Will soon submit the updated patch.

Rgds,
Arul Shaji

 
FAST PostgreSQL wrote:   
Am Dienstag, 3. April 2007 20:33 schrieb FAST PostgreSQL:       
Attached is the completed patch for the COPY-able sql log outputs.         
Could you please remove random whitespace changes from this patch?       
Done and attached.     
Brief review of the CSV aspect only:

a. username and databasename should probably be quoted and escaped in
case they contain dangerous characters (even though that's unlikely)
b. calling pg_get_client_encoding() inside the loop in
escape_string_literal seems suboptimal. At the very least it should be
moved outside the loop so it's only called once per string.

cheers

andrew   

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
 

pgsql-patches by date:

Previous
From: "Jaime Casanova"
Date:
Subject: Re: Re: [HACKERS] [COMMITTERS] pgsql: Add GUC temp_tablespaces to provide a default location for
Next
From: Zoltan Boszormenyi
Date:
Subject: Re: IDENTITY/GENERATED v36 Re: Final version of IDENTITY/GENERATED patch