Skip to content

Commit

Permalink
Merge pull request #120 from developmentseed/issue67
Browse files Browse the repository at this point in the history
use older function to support old Postgres
  • Loading branch information
vincentsarago authored Oct 2, 2023
2 parents f23cb4a + e0d004d commit 627a257
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).

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`

## [0.4.4] - TBD

### fixed

- replace `string_to_table(...)` by `unnest(string_to_array(...))` to support Postgres<14

## [0.4.3] - 2023-08-28

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

- Initial release

[unreleased]: https://github.com/developmentseed/tipg/compare/0.4.3...HEAD
[unreleased]: https://github.com/developmentseed/tipg/compare/0.4.4...HEAD
[0.4.4]: https://github.com/developmentseed/tipg/compare/0.4.3...0.4.4
[0.4.3]: https://github.com/developmentseed/tipg/compare/0.4.2...0.4.3
[0.4.2]: https://github.com/developmentseed/tipg/compare/0.4.1...0.4.2
[0.4.1]: https://github.com/developmentseed/tipg/compare/0.4.0...0.4.1
Expand Down
4 changes: 2 additions & 2 deletions tipg/sql/dbcatalog.sql
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ $$ LANGUAGE SQL;

CREATE OR REPLACE FUNCTION pg_temp.tipg_fun_defaults(defaults pg_node_tree) RETURNS text[] AS $$
WITH d AS (
SELECT btrim(split_part(btrim(string_to_table(
SELECT btrim(split_part(btrim(unnest(string_to_array(
pg_get_expr(defaults,0::oid),
','
)),'::',1),'''') d
))),'::',1),'''') d
) SELECT array_agg(d) FROM d
;
$$ LANGUAGE SQL;
Expand Down

0 comments on commit 627a257

Please sign in to comment.