internal/postgres: filter symbols versions
GetPackageSymbols no longer returns incompatible or non-release
versions.
For golang/go#37102
Trust: Julie Qiu
Run-TryBot: Julie Qiu
TryBot-Result: kokoro
@@ -35,7 +35,11 @@ func (db *DB) GetPackageSymbols(ctx context.Context, packagePath, modulePath str
INNER JOIN paths p1 ON u.path_id = p1.id
INNER JOIN symbol_names s1 ON ps.symbol_name_id = s1.id
INNER JOIN symbol_names s2 ON ps.parent_symbol_name_id = s2.id
- WHERE p1.path = $1 AND m.module_path = $2
+ WHERE
+ p1.path = $1
+ AND m.module_path = $2
+ AND NOT m.incompatible
+ AND m.version_type = 'release'
ORDER BY
CASE WHEN ps.type='Type' THEN 0 ELSE 1 END,
symbol_name;`
