xhgui
xhgui copied to clipboard
Fix PostgreSQL column name case sensitivity in WHERE clauses
PostgreSQL treats unquoted identifiers as lowercase, but the xhgui schema creates columns with specific case (e.g., SERVER in uppercase). This causes SQL errors when filtering results:
SQLSTATE[42703]: Undefined column: column "server" does not exist
This commit quotes all column names in WHERE clauses to preserve their case, ensuring PostgreSQL uses the exact column names as defined in the schema. The fix is compatible with both PostgreSQL and MySQL databases (relies on the already set SQL_MODE=ANSI_QUOTES).
Affected columns:
simple_urlrequest_daterequest_tsSERVER(for remote_addr, cookie, and server_name filters)
Fixes the "Slim Application Error" when viewing traces in xhgui with PostgreSQL backends.
Resolves #573