Skip to content

Commit c370c61

Browse files
committed
remove pg13 from repo
1 parent 1abd002 commit c370c61

File tree

10 files changed

+496
-428
lines changed

10 files changed

+496
-428
lines changed

bin/gen-ext.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,10 @@ def generate_package_details_tabs(self, pkg_name: str) -> str:
734734

735735
# Group packages by PG version
736736
pg_groups: Dict[int, List[PackageDetail]] = {}
737+
active_pg = set(self.pg_versions)
737738
for detail in details:
739+
if detail.pg not in active_pg:
740+
continue
738741
if detail.pg not in pg_groups:
739742
pg_groups[detail.pg] = []
740743
pg_groups[detail.pg].append(detail)
@@ -821,7 +824,10 @@ def generate_install_section(self, ext: ExtensionData) -> str:
821824

822825
# Generate install commands for supported PG versions
823826
install_cmds = []
827+
active_pg = set(self.pg_versions)
824828
for pg in sorted(ext.pg_ver, reverse=True):
829+
if pg not in active_pg:
830+
continue
825831
install_cmds.append(f"pig ext install {ext.name} -v {pg}; # install for PG {pg}")
826832

827833
# Determine CASCADE SCHEMA clause

cli/cc_page.go

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,16 @@ func (g *CCPageGenerator) generateDownloads(binaries []*Binary) string {
520520
var b strings.Builder
521521

522522
// Group by PG version
523+
activePG := make(map[int]bool, len(g.Cache.PGVersions))
524+
for _, pg := range g.Cache.PGVersions {
525+
activePG[pg] = true
526+
}
527+
523528
pgGroups := make(map[int][]*Binary)
524529
for _, bin := range binaries {
530+
if !activePG[bin.PG] {
531+
continue
532+
}
525533
pgGroups[bin.PG] = append(pgGroups[bin.PG], bin)
526534
}
527535

@@ -668,7 +676,17 @@ func (g *CCPageGenerator) generateInstall(ext *Extension) string {
668676
}
669677

670678
// Version-specific install
671-
pgVersions := ParsePGVersions(ext.PgVer)
679+
activePG := make(map[int]bool, len(g.Cache.PGVersions))
680+
for _, pg := range g.Cache.PGVersions {
681+
activePG[pg] = true
682+
}
683+
684+
var pgVersions []int
685+
for _, pg := range ParsePGVersions(ext.PgVer) {
686+
if activePG[pg] {
687+
pgVersions = append(pgVersions, pg)
688+
}
689+
}
672690
sort.Sort(sort.Reverse(sort.IntSlice(pgVersions)))
673691
for _, pg := range pgVersions {
674692
b.WriteString(fmt.Sprintf("pig ext install %s -v %d; # 为 PG %d 安装\n", ext.Name, pg, pg))

cli/confgen.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,8 +618,6 @@ func (g *PigstyConfigGenerator) getPGAuditPackageName(pgVer int) string {
618618
return "pgaudit17_15"
619619
case 14:
620620
return "pgaudit16_14"
621-
case 13:
622-
return "pgaudit15_13"
623621
default:
624622
return fmt.Sprintf("pgaudit_%d", pgVer)
625623
}

cli/gen_page.go

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,8 +618,16 @@ func (g *ExtensionGenerator) generateAvailabilityMatrix(packages []*PkgInfo, bin
618618

619619
func (g *ExtensionGenerator) generatePackageDetailsTabs(extName string, packages []*PkgInfo, binaries []*Binary) string {
620620
// Group binaries by PG version (binaries are already properly sorted from SQL)
621+
activePG := make(map[int]bool, len(g.Cache.PGVersions))
622+
for _, pg := range g.Cache.PGVersions {
623+
activePG[pg] = true
624+
}
625+
621626
pgGroups := make(map[int][]*Binary)
622627
for _, binary := range binaries {
628+
if !activePG[binary.PG] {
629+
continue
630+
}
623631
pgGroups[binary.PG] = append(pgGroups[binary.PG], binary)
624632
}
625633

@@ -759,7 +767,17 @@ func (g *ExtensionGenerator) generateInstallSection(ext *Extension) string {
759767
}
760768

761769
// Parse PG versions
762-
pgVersions := ParsePGVersions(ext.PgVer)
770+
activePG := make(map[int]bool, len(g.Cache.PGVersions))
771+
for _, pg := range g.Cache.PGVersions {
772+
activePG[pg] = true
773+
}
774+
775+
var pgVersions []int
776+
for _, pg := range ParsePGVersions(ext.PgVer) {
777+
if activePG[pg] {
778+
pgVersions = append(pgVersions, pg)
779+
}
780+
}
763781
sort.Sort(sort.Reverse(sort.IntSlice(pgVersions)))
764782

765783
// Generate install commands

db/extension.csv

Lines changed: 394 additions & 394 deletions
Large diffs are not rendered by default.

db/pg.csv

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,4 @@ pg,active,version,minor,src_url
33
17,t,17.6,6,https://ftp.postgresql.org/pub/source/v17.6/postgresql-17.6.tar.gz
44
16,t,16.10,10,https://ftp.postgresql.org/pub/source/v16.10/postgresql-16.10.tar.gz
55
15,t,15.14,14,https://ftp.postgresql.org/pub/source/v15.14/postgresql-15.14.tar.gz
6-
14,t,14.19,19,https://ftp.postgresql.org/pub/source/v14.19/postgresql-14.19.tar.gz
7-
13,t,13.22,22,https://ftp.postgresql.org/pub/source/v13.22/postgresql-13.22.tar.gz
8-
12,f,12.22,22,https://ftp.postgresql.org/pub/source/v12.22/postgresql-12.22.tar.gz
9-
11,f,11.22,22,https://ftp.postgresql.org/pub/source/v11.22/postgresql-11.22.tar.gz
10-
10,f,10.23,23,https://ftp.postgresql.org/pub/source/v10.23/postgresql-10.23.tar.gz
6+
14,t,14.19,19,https://ftp.postgresql.org/pub/source/v14.19/postgresql-14.19.tar.gz

db/reload.sql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ FROM (SELECT * FROM pgext.extension WHERE lead AND NOT contrib) ext,
1313
(SELECT * FROM pgext.os WHERE active) os,
1414
(SELECT * FROM pgext.pg WHERE active) pg;
1515
-- special case handling
16-
UPDATE pgext.pkg SET name = replace(name, 'pgaudit', 'pgaudit' || (pg+2)::TEXT ) WHERE pkg = 'pgaudit' AND pg IN (13,14,15) AND os ~ 'el\d';
16+
UPDATE pgext.pkg SET name = replace(name, 'pgaudit', 'pgaudit' || (pg+2)::TEXT ) WHERE pkg = 'pgaudit' AND pg IN (14,15) AND os ~ 'el\d';
1717
UPDATE pgext.pkg SET name = (regexp_split_to_array(name, ' '))[1] WHERE pkg = 'postgis' AND position(' ' in name) > 0;
1818
UPDATE pgext.pkg SET name = (regexp_split_to_array(name, ' '))[1] WHERE pkg = 'pgrouting' AND position(' ' in name) > 0;
1919

@@ -30,7 +30,6 @@ UPDATE pgext.pkg SET state = 'AVAIL' WHERE count > 0;
3030

3131
-- conflict with other extension, hide in list
3232
UPDATE pgext.pkg SET hide = true WHERE pkg IN ('hydra' ,'duckdb_fdw');
33-
UPDATE pgext.pkg SET hide = true WHERE pkg = 'pg_timeseries' AND (os ~ 'u24.*' OR os ~ 'el10.*') AND pg = 13;
3433

3534
-- too big, non-free, heavy extensions
3635
UPDATE pgext.pkg SET hide = true WHERE pkg IN ('plr', 'informix_fdw' ,'oracle_fdw', 'db2_fdw', 'pg_utl_smtp' ,'pg_strom', 'repmgr', 'pgpool', 'pgagent', 'dbt2');
@@ -46,4 +45,3 @@ UPDATE pgext.pkg SET hide = true, state = 'BREAK' WHERE pkg = 'pg_dbms_job' AND
4645

4746
-- 'pgext.refresh_pkg complete';
4847
UPDATE pgext.status SET recap_time = now();
49-

0 commit comments

Comments
 (0)