PostgreSQLDirect and pg logging
Posted: Thu 22 Dec 2005 05:14
When using PostgreSQLDirect.NET to talk to postgres, I use code of this nature:
dbCmd = New PgSqlCommand("INSERT INTO seriesEntry(id,dateOf,kindOf,amount)" & _
" VALUES (@id,@dateOf,@kindOf,@amount);", dbCon)
dbCmd.Parameters.Add("@id", mId)
dbCmd.Parameters.Add("@dateOf", entry.dateOf)
dbCmd.Parameters.Add("@kindOf", entry.kindOf)
dbCmd.Parameters.Add("@amount", entry.amount)
'dbCmd.Parameters.Add("@indexOf", entry.indexOf)
'dbCmd.Parameters.Add("@apy", entry.apy)
dbCmd.ExecuteNonQuery()
etc. When I look at my postgres log files, I see:
2005-12-22 04:05:59 LOG: statement: INSERT INTO seriesEntry(id,dateOf,kindOf,amount) VALUES ($1,$2,$3,$4);
How can I get the log file to show the actual parameter values, instead of the placeholders $1,$2,$3,$4 ???
dbCmd = New PgSqlCommand("INSERT INTO seriesEntry(id,dateOf,kindOf,amount)" & _
" VALUES (@id,@dateOf,@kindOf,@amount);", dbCon)
dbCmd.Parameters.Add("@id", mId)
dbCmd.Parameters.Add("@dateOf", entry.dateOf)
dbCmd.Parameters.Add("@kindOf", entry.kindOf)
dbCmd.Parameters.Add("@amount", entry.amount)
'dbCmd.Parameters.Add("@indexOf", entry.indexOf)
'dbCmd.Parameters.Add("@apy", entry.apy)
dbCmd.ExecuteNonQuery()
etc. When I look at my postgres log files, I see:
2005-12-22 04:05:59 LOG: statement: INSERT INTO seriesEntry(id,dateOf,kindOf,amount) VALUES ($1,$2,$3,$4);
How can I get the log file to show the actual parameter values, instead of the placeholders $1,$2,$3,$4 ???