Skip to content

Commit 2b7b2b7

Browse files
Last try... Seriously
1 parent 55ea1cb commit 2b7b2b7

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,14 @@ jobs:
4343
- uses: actions/checkout@v2
4444

4545
- name: Update repositories
46-
run: sudo apt install curl ca-certificates
47-
sudo install -d /usr/share/postgresql-common/pgdg &&
48-
sudo curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc &&
49-
. /etc/os-release &&
50-
sudo sh -c "echo 'deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $VERSION_CODENAME-pgdg main' > /etc/apt/sources.list.d/pgdg.list" &&
46+
run: sudo apt -y install wget ca-certificates &&
47+
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - &&
48+
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' &&
49+
sudo apt-get --purge remove postgresql &&
5150
sudo apt update
5251

5352
- name: Install postgres
54-
run: sudo apt install -y postgresql-18 libpq-dev clang-format postgresql-server-dev-18
53+
run: sudo apt install -y postgresql-16 libpq-dev clang-format postgresql-server-dev-16
5554

5655
- name: Start Postgres
5756
run: sudo systemctl restart postgresql && sleep 5

hash_set.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#include "c.h"
2-
#include "common/int.h"
32
#include "pg_set.h"
43
#include "varatt.h"
54
#define EXPANDED_CAPACITY(capacity_) (capacity_ * 2)
@@ -92,7 +91,7 @@ pg_set_element_cmp(const void *p1, const void *p2)
9291
PgSetElement v1 = *((const PgSetElement *) p1);
9392
PgSetElement v2 = *((const PgSetElement *) p2);
9493

95-
return pg_cmp_s32(v1, v2);
94+
return CMP(v1, v2);
9695
}
9796

9897
PgSet *

pg_set.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,4 @@ ArrayType *cast_to_array(PgSet *args);
7979
#define PgSetEqualsStrategyNumber 6
8080
#define PgSetSubsetStrategyNumber 7
8181
#define PgSetContainsStrategyNumber 13
82+
#define CMP(a, b) ((a > b) - (a < b));

pg_set_gist.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "postgres.h"
22
#include "access/gist.h"
33
#include "access/reloptions.h"
4-
#include "common/int.h"
54
#include "fmgr.h"
65
#include "pg_set.h"
76
#include "port/pg_bitutils.h"
@@ -682,6 +681,6 @@ calc_penalty(GistPgSet *left, GistPgSet *right, uint32 masklen)
682681
static int
683682
comparecost(const void *a, const void *b)
684683
{
685-
return pg_cmp_s32(((const GistSplitCost *) a)->cost,
686-
((const GistSplitCost *) b)->cost);
684+
return CMP(((const GistSplitCost *) a)->cost,
685+
((const GistSplitCost *) b)->cost);
687686
}

0 commit comments

Comments
 (0)