Skip to content

Commit fee6dc7

Browse files
authored
In case of invalid query return position of error in query string (#3)
Also update libpg_query to fix compilation problems and regenerate protobufs
1 parent 8bc8d6a commit fee6dc7

File tree

15 files changed

+11590
-11427
lines changed

15 files changed

+11590
-11427
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ifeq ($(shell uname -s),Darwin)
1111
LDFLAGS += -undefined dynamic_lookup
1212
endif
1313

14-
.PHONY: all libpg_query_ex clean
14+
.PHONY: all libpg_query_ex clean update-libpg_query
1515

1616
all: priv/libpg_query_ex.so
1717

@@ -31,3 +31,7 @@ clean:
3131
$(MIX) clean
3232
$(MAKE) -C $(LIBPG_QUERY_PATH) clean
3333
$(RM) priv/libpg_query_ex.so
34+
35+
update-libpg_query:
36+
git subtree pull -P "c_src/libpg_query" --squash https://github.com/pganalyze/libpg_query.git 15-latest
37+

c_src/libpg_query/CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
All versions are tagged by the major Postgres version, plus an individual semver for this library itself.
44

5+
## 15-4.2.3 2023-07-07
6+
7+
* Fix builds when compiling with `glibc >= 2.38` [#203](https://github.com/pganalyze/libpg_query/pull/203)
8+
* Deparser: Add support for COALESCE and other expressions in LIMIT clause [#199](https://github.com/pganalyze/libpg_query/pull/199)
9+
10+
## 15-4.2.2 2023-07-07
11+
12+
* Deparser:
13+
- Add support for multi-statement CREATE PROCEDURE definitions [#197](https://github.com/pganalyze/libpg_query/pull/197)
14+
- Correctly quote identifier in ALTER TABLE ... ADD CONSTRAINT [x] [#196](https://github.com/pganalyze/libpg_query/pull/196)
15+
- Add support for index fillfactor within CREATE TABLE, fix SHOW ALL [#193](https://github.com/pganalyze/libpg_query/pull/193)
16+
- Move to dedicated file for easier inclusion in third-party projects [#192](https://github.com/pganalyze/libpg_query/pull/192)
17+
18+
## 15-4.2.1 2023-05-17
19+
20+
* Deparser: Handle INTERVAL correctly when used in SET statements [#184](https://github.com/pganalyze/libpg_query/pull/184)
21+
* Deparser: Ensure index names are quoted as identifiers [#182](https://github.com/pganalyze/libpg_query/pull/182)
22+
* Remove limits.h from pg_query_deparse.c [#181](https://github.com/pganalyze/libpg_query/pull/181)
23+
524
## 15-4.2.0 2023-02-06
625

726
* Update copyright notice years and authors [#175](https://github.com/pganalyze/libpg_query/pull/175)

c_src/libpg_query/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ PG_VERSION = 15.1
1010
PG_VERSION_MAJOR = $(call word-dot,$(PG_VERSION),1)
1111
PROTOC_VERSION = 3.14.0
1212

13-
VERSION = 4.2.0
13+
VERSION = 4.2.3
1414
VERSION_MAJOR = $(call word-dot,$(VERSION),1)
1515
VERSION_MINOR = $(call word-dot,$(VERSION),2)
1616
VERSION_PATCH = $(call word-dot,$(VERSION),3)
@@ -148,7 +148,8 @@ $(PGDIR):
148148
echo "#undef USE_ARMV8_CRC32C" >> $(PGDIR)/src/include/pg_config.h
149149
echo "#undef USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" >> $(PGDIR)/src/include/pg_config.h
150150
# Ensure we don't fail on systems that have strchrnul support (FreeBSD and NetBSD)
151-
echo "#if defined(__FreeBSD__) || defined(__NetBSD__)" >> $(PGDIR)/src/include/pg_config.h
151+
echo "#include <stdlib.h>" >> $(PGDIR)/src/include/pg_config.h
152+
echo "#if defined(__FreeBSD__) || defined(__NetBSD__) || (defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 38) || __GLIBC__ > 2))" >> $(PGDIR)/src/include/pg_config.h
152153
echo "#define HAVE_STRCHRNUL" >> $(PGDIR)/src/include/pg_config.h
153154
echo "#endif" >> $(PGDIR)/src/include/pg_config.h
154155

0 commit comments

Comments
 (0)