Skip to content

Commit

Permalink
Upgrade to Postgres 17 and libpg_query 6.0.0 (#321)
Browse files Browse the repository at this point in the history
* Bump libpg_query tag and checksum

* Update sources

* Fix tests

* Update CHANGELOG, version
  • Loading branch information
msepga authored Nov 26, 2024
1 parent 42da42b commit 91bb771
Show file tree
Hide file tree
Showing 476 changed files with 123,327 additions and 94,534 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@

* ...

## 6.0.0 2024-11-26

* Upgrade to libpg_query 17-6.0.0
- Updates to the Postgres 17 parser
- Deparser improvements:
- Add support for deparsing `JSON_TABLE`, `JSON_QUERY`, `JSON_EXISTS`, `JSON_VALUE`
- Add support for deparsing `JSON`, `JSON_SCALAR`, `JSON_SERIALIZE`
- Add support for deparsing `COPY ... FORCE_NULL(*)`
- Add support for deparsing `ALTER COLUMN ... SET EXPRESSION AS`
- Add support for deparsing `SET STATISTICS DEFAULT`
- Add support for deparsing `SET ACCESS METHOD DEFAULT`
- Add support for deparsing `... AT LOCAL`
- Add support for deparsing `merge_action()`
- Add support for deparsing `MERGE ... RETURNING`
- Add support for deparsing `NOT MATCHED [ BY TARGET ]`
* Improve treewalker performance by avoiding allocations [(#309)](https://github.com/pganalyze/pg_query_go/pull/309)
* Fix FreeBSD builds [(#313)](https://github.com/pganalyze/pg_query_go/pull/313)

## 5.1.0 2024-01-09

* Update to libpg_query 16-5.1.0
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
pg_query (5.1.0)
pg_query (6.0.0)
google-protobuf (>= 3.25.3)

GEM
Expand Down
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ require 'rspec/core/rake_task'
require 'rubocop/rake_task'
require 'open-uri'

LIB_PG_QUERY_TAG = '16-5.1.0'.freeze
LIB_PG_QUERY_SHA256SUM = '31f25b573da1c966bc762b0313b0a50cdd03aabdbaf666d90469eddcb1656df7'.freeze
LIB_PG_QUERY_TAG = '17-6.0.0'.freeze
LIB_PG_QUERY_SHA256SUM = '98cf618ec94595d530c5fdff21c77cb2403187fd660993aeab4ad73ca06bbabd'.freeze

Rake::ExtensionTask.new 'pg_query' do |ext|
ext.lib_dir = 'lib/pg_query'
Expand Down
7 changes: 4 additions & 3 deletions ext/pg_query/include/pg_query.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ extern "C" {
#endif

PgQueryNormalizeResult pg_query_normalize(const char* input);
PgQueryNormalizeResult pg_query_normalize_utility(const char* input);
PgQueryScanResult pg_query_scan(const char* input);
PgQueryParseResult pg_query_parse(const char* input);
PgQueryParseResult pg_query_parse_opts(const char* input, int parser_options);
Expand Down Expand Up @@ -131,9 +132,9 @@ void pg_query_free_fingerprint_result(PgQueryFingerprintResult result);
void pg_query_exit(void);

// Postgres version information
#define PG_MAJORVERSION "16"
#define PG_VERSION "16.1"
#define PG_VERSION_NUM 160001
#define PG_MAJORVERSION "17"
#define PG_VERSION "17.0"
#define PG_VERSION_NUM 170000

// Deprecated APIs below

Expand Down
Loading

0 comments on commit 91bb771

Please sign in to comment.