Richard,
I'm not sure if this is the kind of log that you meant, but the one in
pg_log goes like this (the first query corresponding to the ODBC execution
(112157 ms), the second one is from pgAdmin (250 ms). I also logged for the
ODBC driver but didn't find any differences between the steps followed in
both cases.
2008-05-27 02:55:10 GMT LOG: duration: 112157.000 ms statement: SELECT
"Patient"."Patient_ID"
FROM "Patient",
"PatientFamily",
"PatientFamilyRole",
"Title",
"City" PatientCity,
"City" PatientAltCity,
"City" PatientEmployerCity,
"City" PatientDoctorCity,
"Province" PatientProvince,
"Province" PatientAltProvince,
"Province" PatientEmployerProvince,
"Province" PatientDoctorProvince,
"Country" PatientCountry,
"Country" PatientAltCountry,
"Country" PatientEmployerCountry,
"Country" PatientDoctorCountry
WHERE "Patient"."Family_ID"="PatientFamily"."Family_ID" AND
"Patient"."FamilyRole_ID"="PatientFamilyRole"."FamilyRole_ID" AND
"Patient"."Title_ID"="Title"."Title_ID" AND
"Patient"."City_ID"=PatientCity."City_ID" AND
"Patient"."Province_ID"=PatientProvince."Province_ID" AND
"Patient"."Country_ID"=PatientCountry."Country_ID" AND
"Patient"."AltCity_ID"=PatientAltCity."City_ID" AND
"Patient"."AltProvince_ID"=PatientAltProvince."Province_ID"
AND
"Patient"."AltCountry_ID"=PatientAltCountry."Country_ID" AND
"Patient"."EmployerCity_ID"=PatientEmployerCity."City_ID" AND
"Patient"."EmployerProvince_ID"=PatientEmployerProvince."Province_ID" AND
"Patient"."EmployerCountry_ID"=PatientEmployerCountry."Country_ID" AND
"Patient"."DoctorCity_ID"=PatientDoctorCity."City_ID" AND
"Patient"."DoctorProvince_ID"=PatientDoctorProvince."Province_ID" AND
"Patient"."DoctorCountry_ID"=PatientDoctorCountry."Country_ID"
AND
"Patient"."Patient_ID"=10450
2008-05-27 03:00:07 GMT LOG: loaded library
"$libdir/plugins/plugin_debugger.dll"
2008-05-27 03:00:08 GMT LOG: duration: 108.999 ms statement: set
client_encoding to 'UNICODE'
2008-05-27 03:00:11 GMT LOG: loaded library
"$libdir/plugins/plugin_debugger.dll"
2008-05-27 03:00:12 GMT LOG: loaded library
"$libdir/plugins/plugin_debugger.dll"
2008-05-27 03:00:14 GMT ERROR: unterminated quoted string at or near "' "
at character 554
2008-05-27 03:00:14 GMT STATEMENT: select n.nspname, c.relname, a.attname,
a.atttypid, t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull,
c.relhasrules, c.relkind, c.oid, d.adsrc from (((pg_catalog.pg_class c inner
join pg_catalog.pg_namespace n on n.oid = c.relnamespace and c.oid =
3368883) inner join pg_catalog.pg_attribute a on (not a.attisdropped) and
a.attnum > 0 and a.attrelid = c.oid) inner join pg_catalog.pg_type t on
t.oid = a.atttypid) left outer join pg_attrdef d on a.atthasdef and
d.adrelid = a.attrelid and d.adnum = a.attnum order by n.nspname, c.relname,
attnum'
2008-05-27 03:07:29 GMT LOG: duration: 250.000 ms statement: SELECT
"Patient"."Patient_ID"
FROM "Patient",
"PatientFamily",
"PatientFamilyRole",
"Title",
"City" PatientCity,
"City" PatientAltCity,
"City" PatientEmployerCity,
"City" PatientDoctorCity,
"Province" PatientProvince,
"Province" PatientAltProvince,
"Province" PatientEmployerProvince,
"Province" PatientDoctorProvince,
"Country" PatientCountry,
"Country" PatientAltCountry,
"Country" PatientEmployerCountry,
"Country" PatientDoctorCountry
WHERE "Patient"."Family_ID"="PatientFamily"."Family_ID" AND
"Patient"."FamilyRole_ID"="PatientFamilyRole"."FamilyRole_ID" AND
"Patient"."Title_ID"="Title"."Title_ID" AND
"Patient"."City_ID"=PatientCity."City_ID" AND
"Patient"."Province_ID"=PatientProvince."Province_ID" AND
"Patient"."Country_ID"=PatientCountry."Country_ID"
AND
"Patient"."AltCity_ID"=PatientAltCity."City_ID" AND
"Patient"."AltProvince_ID"=PatientAltProvince."Province_ID" AND
"Patient"."AltCountry_ID"=PatientAltCountry."Country_ID" AND
"Patient"."EmployerCity_ID"=PatientEmployerCity."City_ID" AND
"Patient"."EmployerProvince_ID"=PatientEmployerProvince."Province_ID" AND
"Patient"."EmployerCountry_ID"=Patien