Skip to content

Commit

Permalink
Problem: xpath symbol conflict with postgres binary
Browse files Browse the repository at this point in the history
Solution: rename the internal function name
  • Loading branch information
yrashk committed Jun 28, 2024
1 parent 8c14ff5 commit dc90da5
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 12 deletions.
22 changes: 22 additions & 0 deletions extensions/omni_xml/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.1] - 2024-06-28

### Fixed

* Fixed `xpath` symbol conflict [#566]: [https://github.com/omnigres/omnigres/pull/566]

## [0.1.0] - 2024-03-05

Initial release following a few months of iterative development.

[Unreleased]: https://github.com/omnigres/omnigres/commits/next/omni_httpd

[0.1.0]: [https://github.com/omnigres/omnigres/pull/511]

[0.1.1]: [https://github.com/omnigres/omnigres/pull/566]
10 changes: 1 addition & 9 deletions extensions/omni_xml/migrate/1_xpath.sql
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
create function xpath(document text, query text)
returns table
(
path text,
value text
)
language c
as
'MODULE_PATHNAME';
/*{% include "../src/xpath.sql" %}*/
4 changes: 2 additions & 2 deletions extensions/omni_xml/omni_xml.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ extern "C" {

void _PG_init() { init(); }

PG_FUNCTION_INFO_V1(xpath);
Datum xpath(PG_FUNCTION_ARGS) { return xpath_impl(fcinfo); }
PG_FUNCTION_INFO_V1(xpath_fn);
Datum xpath_fn(PG_FUNCTION_ARGS) { return xpath_impl(fcinfo); }
}
10 changes: 10 additions & 0 deletions extensions/omni_xml/src/xpath.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
create function xpath(document text, query text)
returns table
(
path text,
value text
)
language c
as
'MODULE_PATHNAME',
'xpath_fn';
2 changes: 1 addition & 1 deletion versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ omni_var=0.1.0
omni_vfs_types_v1=0.1.0
omni_vfs=0.1.1
omni_web=0.1.0
omni_xml=0.1.0
omni_xml=0.1.1

0 comments on commit dc90da5

Please sign in to comment.