[SAC] [OSGeo] #2805: trac making bogus SQL queries

#2805: trac making bogus SQL queries
---------------------------+------------------------------
Reporter: strk | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Unplanned
Component: Systems Admin | Keywords: trac, postgresql
---------------------------+------------------------------
I found these errors in the PostgreSQL 12 log, on tracsvn machine:
{{{
2022-09-14 05:46:09 GMT ERROR: column reference "description" is
ambiguous at character 176
2022-09-14 05:46:09 GMT STATEMENT: SELECT p.value AS __color__,
            id AS ticket, summary, component, version, milestone, t.type AS
type,
            owner, status,
            time AS created,
            changetime AS _changetime, description AS _description,
            reporter AS _reporter
           FROM ticket t
           LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
           WHERE status <> 'closed'
           ORDER BY ticket DESC, milestone, t.type, time
}}}

The logs do not contain the name of the database (HINT: we should add
that) but it does sound like coming from trac. I don't know if it's a
custom query or a core query, but it is bogus.
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2805&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2805: trac making bogus SQL queries
------------------------------+------------------------
Reporter: strk | Owner: sac@…
     Type: task | Status: new
Priority: normal | Milestone: Unplanned
Component: Systems Admin | Resolution:
Keywords: trac, postgresql |
------------------------------+------------------------
Comment (by robe):

it's most likely a custom query. PostGIS and Live had many of these that
I fixed a while ago.
It happened after the trac upgrade because they added a description column
to a bunch of tables so past queries where the description column was not
table qualified broke.
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2805#comment:1&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.

#2805: trac making bogus SQL queries
------------------------------+------------------------
Reporter: strk | Owner: sac@…
     Type: task | Status: closed
Priority: normal | Milestone: Unplanned
Component: Systems Admin | Resolution: wontfix
Keywords: trac, postgresql |
------------------------------+------------------------
Changes (by robe):

* status: new => closed
* resolution: => wontfix

Comment:

I see at least one broken on mapguide.

https://trac.osgeo.org/mapguide/report/9

one broken on gdal
https://trac.osgeo.org/gdal/report/9

But I don't have admin rights to fix those.

At any rate I suspect the logs you are seeing are a result of crawlers
trying to access those reports and many on archived trackers. So I don't
think it's worth fixing.
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2805#comment:2&gt;
OSGeo <https://osgeo.org/&gt;
OSGeo committee and general foundation issue tracker.