freespace-bug.patch
text/x-diff
Filename: freespace-bug.patch
Type: text/x-diff
Part: 0
Patch
Format: unified
| File | + | − |
|---|---|---|
| contrib/pg_freespacemap/pg_freespacemap--1.2--1.3.sql | 1 | 1 |
diff --git a/contrib/pg_freespacemap/pg_freespacemap--1.2--1.3.sql b/contrib/pg_freespacemap/pg_freespacemap--1.2--1.3.sql
index 7f92c9e92e3..a75c4d8642b 100644
--- a/contrib/pg_freespacemap/pg_freespacemap--1.2--1.3.sql
+++ b/contrib/pg_freespacemap/pg_freespacemap--1.2--1.3.sql
@@ -9,5 +9,5 @@ RETURNS SETOF RECORD
LANGUAGE SQL PARALLEL SAFE
BEGIN ATOMIC
SELECT blkno, pg_freespace($1, blkno) AS avail
- FROM generate_series(0, pg_relation_size($1) / current_setting('block_size')::bigint - 1) AS blkno;
+ FROM generate_series(0::bigint, pg_relation_size($1) / current_setting('block_size'::text)::bigint - 1::bigint) AS blkno;
END;