Logging parameters

Forum related to PostgreSQL

Moderators: gto, cipto_kh, EgonHugeist, olehs

Junior Boarder
Junior Boarder
Posts: 25
Joined: 24.10.2006, 18:29
Location: Córdoba, Argentina

Logging parameters

Postby martinrame » 14.03.2014, 13:53

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
Zeos Dev Team
Zeos Dev Team
Posts: 1739
Joined: 31.03.2011, 22:38

Re: Logging parameters

Postby EgonHugeist » 27.06.2014, 22:38

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

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


Return to “PostgreSQL”

Who is online

Users browsing this forum: No registered users and 1 guest