Skip to content

Commit 627a257

Browse files
Merge pull request #120 from developmentseed/issue67
use older function to support old Postgres
2 parents f23cb4a + e0d004d commit 627a257

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

CHANGES.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).
66

77
Note: Minor version `0.X.0` update might break the API, It's recommended to pin `tipg` to minor version: `tipg>=0.1,<0.2`
88

9+
## [0.4.4] - TBD
10+
11+
### fixed
12+
13+
- replace `string_to_table(...)` by `unnest(string_to_array(...))` to support Postgres<14
14+
915
## [0.4.3] - 2023-08-28
1016

1117
### fixed
@@ -131,7 +137,8 @@ Note: Minor version `0.X.0` update might break the API, It's recommended to pin
131137

132138
- Initial release
133139

134-
[unreleased]: https://github.com/developmentseed/tipg/compare/0.4.3...HEAD
140+
[unreleased]: https://github.com/developmentseed/tipg/compare/0.4.4...HEAD
141+
[0.4.4]: https://github.com/developmentseed/tipg/compare/0.4.3...0.4.4
135142
[0.4.3]: https://github.com/developmentseed/tipg/compare/0.4.2...0.4.3
136143
[0.4.2]: https://github.com/developmentseed/tipg/compare/0.4.1...0.4.2
137144
[0.4.1]: https://github.com/developmentseed/tipg/compare/0.4.0...0.4.1

tipg/sql/dbcatalog.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ $$ LANGUAGE SQL;
130130

131131
CREATE OR REPLACE FUNCTION pg_temp.tipg_fun_defaults(defaults pg_node_tree) RETURNS text[] AS $$
132132
WITH d AS (
133-
SELECT btrim(split_part(btrim(string_to_table(
133+
SELECT btrim(split_part(btrim(unnest(string_to_array(
134134
pg_get_expr(defaults,0::oid),
135135
','
136-
)),'::',1),'''') d
136+
))),'::',1),'''') d
137137
) SELECT array_agg(d) FROM d
138138
;
139139
$$ LANGUAGE SQL;

0 commit comments

Comments
 (0)