Logging parameters

Forum related to PostgreSQL

Moderators: gto, cipto_kh, EgonHugeist, olehs

Post Reply
martinrame
Junior Boarder
Junior Boarder
Posts: 25
Joined: 24.10.2006, 18:29
Location: Córdoba, Argentina
Contact:

Logging parameters

Post by martinrame »

Hi, I'm using Zeos 7.0.3 Stable and TZSqlMonitor, and found update queries with parameters are logged twice, first using "$N" (where N is the param number) then using "?", for example:

Code: Select all

2014-03-14 09:48:36:430 cat: Prepare, proto: postgresql-8, msg: PREPARE 'update paciente set IdPaciente=$1, NroFcr=$2, Protesisortesis=$3, Alergias=$4, ApellidoPaterno=$5, ApellidoMaterno=$6, IdTipoDocumento=$7, NroDocumento=$8, Nombres=$9, FechaNacimiento=$10, IdSexo=$11, Domicilio=$12, Telefono=$13, IdLocalidad=$14, IdDepartamento=$15, IdProvincia=$16, IdEstadoCivil=$17, IdEtnia=$18, IdReligion=$19 where(idpaciente = $20)'
2014-03-14 09:48:36:861 cat: Execute prepared, proto: postgresql-8, msg: update paciente set IdPaciente=?, NroFcr=?, Protesisortesis=?, Alergias=?, ApellidoPaterno=?, ApellidoMaterno=?, IdTipoDocumento=?, NroDocumento=?, Nombres=?, FechaNacimiento=?, IdSexo=?, Domicilio=?, Telefono=?, IdLocalidad=?, IdDepartamento=?, IdProvincia=?, IdEstadoCivil=?, IdEtnia=?, IdReligion=? where(idpaciente = ?)
Note that I've added miliseconds to the query, to let you note the different moments both queries are done.

Apart from that, is there a way to also log the parameter itself?, I mean replacing the $ and ? with its value.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Re: Logging parameters

Post by EgonHugeist »

Please update to a newer rev. (best to 7.2 -> SVN) We're logging the values inbetween.
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Post Reply