All pastes #2045468 Raw Edit

Dan Langille

public sql v1 · immutable
#2045468 ·published 2011-04-12 14:25 UTC
rendered paste body
  SELECT DISTINCT         PA.category,         PA.name AS port,         coalesce(V.date_modified, V.date_entry, V.date_discovery) AS date,         V.vid,         to_char(coalesce(V.date_modified, V.date_entry, V.date_discovery)::date, 'Mon DD') AS date_formatted,         V.date_modified IS NULL AS new,         lower(name)    FROM commit_log_ports_vuxml CLPV, vuxml V, ports_all PA   WHERE CLPV.vuxml_id = V.id     AND CLPV.port_id  = PA.idORDER BY coalesce(V.date_modified, V.date_entry, V.date_discovery) desc, lower(name)   LIMIT 15Well, the data looks right:freshports.org=# select * from vuxml_affected where vuxml_id = 1603685;   id    | vuxml_id |  type   ---------+----------+--------- 2440009 |  1603685 | package 2440010 |  1603685 | package(2 rows)freshports.org=# select * from vuxml_names where vuxml_affected_id in (SELECT ID from vuxml_affected where vuxml_id = 1603685);   id    | vuxml_affected_id |       name        ---------+-------------------+------------------- 4285134 |           2440009 | isc-dhcp31-client 4285135 |           2440010 | isc-dhpc41-client(2 rows)freshports.org=# select * from vuxml_ranges where vuxml_affected_id in (SELECT ID from vuxml_affected where vuxml_id = 1603685);   id    | vuxml_affected_id | operator1 |  version1   | operator2 | version2 ---------+-------------------+-----------+-------------+-----------+---------- 2753003 |           2440009 | lt        | 3.1.ESV_1,1 |           |  2753004 |           2440010 | lt        | 4.1.e,2     |           | (2 rows)freshports.org=#