Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
533 commits
Select commit Hold shift + click to select a range
8607641
PG14: Remove AEXPR_PAREN from deparser
wolfgangwalther Sep 5, 2022
93d841f
PG14: Add COERCE_SQL_SYNTAX to deparser
wolfgangwalther Sep 5, 2022
ba1f6a3
PG14: Add COERCION_PLPGSQL to deparser
wolfgangwalther Sep 5, 2022
2834f6e
PG14: Add ROLESPEC_CURRENT_ROLE to deparser
wolfgangwalther Sep 5, 2022
b95af6b
PG14: Rename relkind to objtype for some utility statements in deparser
wolfgangwalther Sep 5, 2022
b2f19d7
PG14: Add AT_Setcompression in deparser
wolfgangwalther Sep 5, 2022
52d9b04
PG14: Add AT_ReAddStatistics to deparser
wolfgangwalther Sep 5, 2022
6978125
PG14: Add AT_DetachPartitionFinalize to deparser
wolfgangwalther Sep 5, 2022
d4ac71f
PG14: Change options to params for REINDEX and CLUSTER in deparser
wolfgangwalther Sep 5, 2022
1558a50
PG14: Add ALTER_SUBSCRIPTION_ADD_PUBLICATION and ALTER_SUBSCRIPTION_D…
wolfgangwalther Sep 5, 2022
0d44f17
WIP: silence extract_source errors during analysis
wolfgangwalther Sep 6, 2022
701189a
PG14: Bump PG_VERSION in Makefile
wolfgangwalther Sep 5, 2022
114d011
PG14: run make extract_source
wolfgangwalther Sep 5, 2022
3a1ade0
PG14: run scripts/extract_headers
wolfgangwalther Sep 5, 2022
4af7926
PG14: run scripts/generate_protobuf_and_funcs
wolfgangwalther Sep 5, 2022
eba72e6
PG14: run protoc
wolfgangwalther Sep 5, 2022
51328b2
PG14: run scripts/generate_fingerprint_outfuncs
wolfgangwalther Sep 5, 2022
8049b0c
running extract_source, make
Sep 29, 2022
c0a01c8
update CREATE STATISTICS deparse
Sep 29, 2022
74e7262
update DROP LANGUAGE deparse
Sep 29, 2022
366b663
update ALTER TABLE PARTITION OF deparse
Sep 29, 2022
b5ba7fc
updating SUBSTRING, POSITION, and OVERLAY funcs deparse
Sep 29, 2022
c38571d
update 'collation for' deparse
Sep 29, 2022
fe0bfbe
update FunctionParameter, ALTER AGGREGATE deparse
Sep 29, 2022
93d9ec9
updating CREATE PROCEDURE, CREATE STATISTICS deparse
Sep 29, 2022
6e68b72
update EXTRACT, GROUP BY DISTINCT deparse
Sep 29, 2022
01d1bfd
update GRANT/REVOKE deparse
Sep 29, 2022
e29a2c2
update TRIM deparse
Sep 29, 2022
0bd0c6a
update AT TIME ZONE deparse
Sep 30, 2022
1007e85
adding CYCLE, SEARCH clauses to deparse
Oct 3, 2022
534d956
update xmlexists() deparse
Oct 3, 2022
3b1564f
update is_normalized deparse
Oct 4, 2022
962b659
cleaning up SHOW deparse
Oct 4, 2022
998757b
fixing version in parse_tests.c
Oct 4, 2022
63743c3
cleaning up tests
Oct 4, 2022
a110273
adding plpgsql deparse tests
Oct 4, 2022
5d18fb5
removing duplicate regress tests
Oct 4, 2022
2c56fcf
removing more regress test duplicates
Oct 4, 2022
60547b9
cleaning up, removing .vscode
Oct 4, 2022
824f48b
removing .vscode again, hopefully correctly
Oct 4, 2022
56844cb
fixing .gitignore
Oct 4, 2022
021e5ee
fix patch 1, rerun make extract_source
Oct 5, 2022
d310538
Don't mark PL/pgSQL parser as experimental (#147)
lfittl Nov 1, 2022
7192557
Support make install on Mac (#150)
ankane Nov 1, 2022
8105cc0
Implement fingerprinting version 3.1
lfittl Nov 1, 2022
da177d0
Normalize additional DDL statatements
lfittl Nov 1, 2022
662539d
Update Postgres to 13.8 and backport bc7a40b4 to fix new Xcode build
lfittl Nov 2, 2022
1097b2c
Release 13-2.2.0
lfittl Nov 3, 2022
b57b3a1
Merge branch '13-latest' into HEAD
msepga Nov 15, 2022
21abc3f
Merge branch 'tlisanti/14-latest' into '14-latest'
msepga Nov 15, 2022
118c2ab
Run extract_source
msepga Nov 17, 2022
e21e1c8
Update test cases
msepga Nov 17, 2022
feb5764
Fix remaining tests
msepga Nov 18, 2022
288e965
Add back missing version and example case
msepga Nov 18, 2022
5b64d81
Small cleanup
msepga Nov 21, 2022
33f4251
Output bare label status in scan tests and example
msepga Nov 21, 2022
0b8aebc
Upgrade to PSQL 14.6
msepga Nov 23, 2022
9f6342f
Remove bare label status from scan output
msepga Nov 23, 2022
6ebd8d8
Bump pg_query to 3.0.0, update CHANGELOG
msepga Nov 23, 2022
d2c270d
Update version in README to 14
msepga Nov 29, 2022
397cbb9
Fix examples/simple
msepga Dec 12, 2022
6fb6dc0
Upgrade to PSQL 15.1
msepga Nov 29, 2022
2b4c909
Regenerate C++ protobuf bindings and fix tests
msepga Nov 29, 2022
558eb96
Update JSON output to match C++ protobufs and remove old example test
msepga Nov 29, 2022
ebc1946
Don't serialize default value for JSON parse tree outputs
msepga Nov 29, 2022
ded303d
Don't output default values in C JSON outfuncs
msepga Nov 30, 2022
a1fd904
Add Boolean value type to extract_headers script
msepga Dec 1, 2022
81946ee
Add additional MERGE fingerprint test
msepga Dec 12, 2022
9b4a3bf
Ensure we don't rely on x86 and ARM intrinsics (i.e. SSE 4.2, etc)
lfittl Dec 10, 2022
1ada550
Merge pull request #167 from pganalyze/15-latest-dev
msepga Dec 13, 2022
20b3179
Extend PgQueryProtobuf.len to machine word size
df7cb Jan 3, 2023
346b34d
Output Boolean nodes during fingerprinting (#170)
msepga Jan 11, 2023
c5c6902
Update copyright notice to reflect current years + pganalyze as autho…
lfittl Feb 6, 2023
aac6ca3
Allow trailing junk in numeric literals (#177)
msepga Feb 6, 2023
4c4f68d
pg_config.h: NetBSD support (#172)
bsiegert Feb 6, 2023
7fb6260
Release version 15-4.2.0
msepga Feb 6, 2023
fc5775e
Update CHANGELOG
msepga Feb 6, 2023
0906d34
Remove limits.h from pg_query_deparse.c (#181)
yrashk Feb 26, 2023
ff32f92
Deparser: Ensure index names are quoted as identifiers (#182)
lfittl Feb 28, 2023
43b116b
Handle deparse of INTERVAL correctly when used in SET statements (#184)
coderdan Mar 25, 2023
1f2d166
Release 15-4.2.1 (#190)
lfittl May 19, 2023
854f18f
Deparser: Add support for index fillfactor within CREATE TABLE, fix S…
emin100 Jun 6, 2023
ed0fd87
Move deparser to dedicated file without pg_query dependencies
lfittl Feb 26, 2023
f1b475d
Deparser: Correctly quote identifier in ALTER TABLE ... ADD CONSTRAIN…
lfittl Jun 10, 2023
1b508f8
Deparser: Add support for multi-statement CREATE PROCEDURE definition…
emin100 Jul 8, 2023
cb3aa9e
Release 15-4.2.2
lfittl Jul 8, 2023
c6ed461
Deparser: Add support for COALESCE and other expressions in LIMIT cla…
lfittl Aug 4, 2023
9b21e32
Fix builds on glibc >= 2.38 (#203)
msepga Aug 4, 2023
0281901
pg_query.proto: Add Token ASCII_36; Add scan test (#211)
evanj Oct 3, 2023
915b3e1
Makefile: Use -Wall for compiling tests (#210)
evanj Oct 3, 2023
009f19d
Fix deparse of particular BooleanTest expressions (#207)
lelit Oct 3, 2023
0a112f6
Fix: ar variable in Makefile to inherit upstream ar command (#217)
gregnr Nov 6, 2023
d7005f5
Protobuf generation: Correctly include $ ASCII_36 token (#219)
lfittl Nov 21, 2023
f1f8a02
Fix deparse `ALTER TABLE table_name ENABLE TRIGGER ALL` syntax errors…
CDThomas Nov 29, 2023
867b65f
Fix type cast for normalizing alter subscription statement (#223)
anuraaga Dec 2, 2023
10556fe
Add Postgres Language Server to README (#204)
lfittl Dec 20, 2023
ab1bcf4
Deparser: Add parens around TypeCast in IndexElem
lfittl Oct 23, 2023
7d87093
Deparser: Treat type casts inside "func_expr_windowless" as functions
lfittl Oct 25, 2023
df5f485
Deparser: Add test for casts using function syntax in FROM
lfittl Dec 20, 2023
9c24ef2
Allow passing parse mode to parse/fingerprint functions
lcheruka Oct 28, 2023
a747a02
- Fixed implicit conversion warning
lcheruka Nov 23, 2023
6bf25eb
Allow passing options to change GUCs that affect parser behaviour
lfittl Dec 20, 2023
7a819b4
Parse option tests: Add test that combines special mode with a GUC op…
lfittl Dec 20, 2023
db39825
Update changelog, prepare `15-4.2.4` release (#227)
msepga Dec 21, 2023
869ebbf
Bump `PG_VERSION`
msepga Dec 13, 2023
c38dce9
Disable ICU during Postgres configuration
msepga Dec 13, 2023
23e0659
Drop trailing junk removal patch
msepga Dec 13, 2023
2024594
Update patch offsets
msepga Dec 13, 2023
3f1b70f
Exclude `*.switch.c` and `*.funcs.c` files
msepga Dec 13, 2023
5c7dca0
Parse auto-generated `nodetags.h` to get node types
msepga Dec 13, 2023
67b7777
Include auto-generated NodeTag enum values
msepga Dec 13, 2023
c263c89
Add `RelFileNumber` as `INT_TYPE`
msepga Dec 15, 2023
fc0f6bb
Add gramparse as header extraction group
msepga Dec 15, 2023
d015a35
Replace deprecated `bms_first_member` with `bms_next_member` in outfuncs
msepga Dec 15, 2023
dff5198
Use `bms_next_member` in `pg_query_outfuncs_protobuf.c`
msepga Dec 15, 2023
668df66
Use `Assert` over deprecated `AssertArg`
msepga Dec 15, 2023
a8cc3c0
Ignore include-only C files in `OBJ_LIST`
msepga Dec 15, 2023
54ab4be
Fix paths for gramparse.h
msepga Dec 15, 2023
d98288f
Resolve new symbol `raw_expression_tree_walker_impl`
msepga Dec 15, 2023
2941d30
Parse `pg_node_attr` on struct fields
msepga Dec 15, 2023
398cf21
Fix deparsing of partition strategy
msepga Dec 15, 2023
937c8aa
Remove old internal node cases when deparsing `ALTER TABLE`
msepga Dec 15, 2023
153de8f
Update `REVOKE` option deparsing
msepga Dec 15, 2023
c811ecf
Update `GRANT` option deparsing
msepga Dec 15, 2023
3cbe395
Correctly deparse `REVOKE ... CASCADE`
msepga Dec 15, 2023
6b11d05
Add patch for trailing junk on param references
msepga Dec 15, 2023
15297a3
Fix deparsing for `COPY ... FORMAT TEXT ...`
msepga Dec 15, 2023
369d561
Fix `xml_serialize` deparsing
msepga Dec 15, 2023
d9f39b2
Deparse `STORAGE` mode
msepga Dec 15, 2023
ccd72cf
Deparse `COERCE_SQL_SYNTAX` format `SYSTEM_USER` correctly
msepga Dec 15, 2023
e4b7946
Add parens around `A_Expr`s when used with `AT TIME ZONE`
msepga Dec 15, 2023
008da80
Update parse test version numbers
msepga Dec 15, 2023
5bd396d
Remove parse test for integer trailing junk
msepga Dec 15, 2023
607f527
Fix debug builds
msepga Dec 15, 2023
14fdff7
Add case for `JOIN_RIGHT_ANTI`
msepga Dec 15, 2023
c2fe907
Update `AclMode` handling to be 64 bits wide
msepga Dec 15, 2023
b2cbddf
Bump Postgres version to 16.1
msepga Dec 15, 2023
dc57eae
Update parse test version numbers for Postgres 16.1
msepga Dec 15, 2023
7d6a33f
Fix `NodeTag` variant names
msepga Dec 15, 2023
7896610
Extract sources
msepga Dec 15, 2023
8db92cb
Extract headers
msepga Dec 15, 2023
baa00ec
Generate protobuf and funcs
msepga Dec 15, 2023
4117082
Generate fingerprint outfuncs
msepga Dec 15, 2023
193f622
Generate C protobuf bindings
msepga Dec 15, 2023
be66206
Replace use of mmap with plain read
msepga Dec 15, 2023
465ecdb
Update version in parse opt tests
msepga Dec 21, 2023
5ce5042
Regenerate C protobuf definitions with `protoc 25.1`
msepga Dec 21, 2023
82e1b7d
Bump `PROTOC_VERSION` to 25.1, use C++17 for C++ builds
msepga Dec 21, 2023
43c0d9b
Regenerate C++ protobuf definitions with `protoc 25.1`
msepga Dec 21, 2023
4266971
Bump actions workflow to use protobuf 25.1
msepga Dec 21, 2023
6cf24fe
Link to `-lm`
msepga Dec 21, 2023
effa239
Suppress more leaks related to unclean protobuf shutdown
msepga Dec 22, 2023
b234708
Deparser: Rework *_expr logic, add COMPRESSION, add NULLS NOT DISTINCT
lfittl Dec 22, 2023
f568c5d
Deparser: Add support for new SQL/JSON functionality
lfittl Dec 22, 2023
9ff3c5b
Adjust valgrind num-callers to 50 (default 12)
lfittl Dec 22, 2023
2a00188
Update README, CHANGELOG for 16-5.0.0 release (#230)
msepga Dec 22, 2023
18d1e43
Optionally support 32-bit builds
lfittl Dec 29, 2023
6f26971
Correctly handle AclMode as an uint64 (not "long")
lfittl Dec 29, 2023
6c485d4
examples/scan: Use correct format specifier for n_tokens
lfittl Dec 29, 2023
980f48b
Keep pg_config overrides in separate pg_config_overrides.h file
lfittl Jan 1, 2024
dac4854
Extract source: Output special includes as include files, not source …
lfittl Dec 30, 2023
ffe139a
Add src/include folder for internal headers and included .c files
lfittl Dec 30, 2023
eb0a70a
Avoid use of mmap, asprintf and strndup to improve portability
lfittl Dec 30, 2023
3f24d93
Improve handling of Postgres version-related defines
lfittl Jan 1, 2024
9860fc8
GH actions: Update to actions/checkout@v4
lfittl Jan 1, 2024
a41cace
extract_source: Improve rewriting of thread local variables in includes
lfittl Jan 1, 2024
0d0236f
Remove strnlen fallback implementation
lfittl Jan 1, 2024
b156e57
Further improve compatibility with non-POSIX systems and C89 compilers
lfittl Jan 1, 2024
c3cd106
extract_source: Handle additional includes that are always needed dir…
lfittl Jan 1, 2024
9c0e5c3
Windows support: Keep port/win32{,_msvc} includes and add to CFLAGS
lfittl Jan 1, 2024
f15f063
Windows support: Simplify write_stderr and should_output_to_client
lfittl Jan 1, 2024
8013276
Windows support: Pull in necessary code during source extraction
lfittl Jan 1, 2024
0599ee1
Windows support: Add fallback implementation for strlcpy
lfittl Jan 1, 2024
049e45e
Windows support: Use correct pg_config defines when on _WIN32/_WIN64
lfittl Jan 1, 2024
da7fa0c
Windows support: Use pg_config_os.h to include port/win32.h if needed
lfittl Jan 1, 2024
f97c253
Windows support: Add Makefile.msvc for building with MSVC and "nmake"
lfittl Jan 1, 2024
ff720f0
Windows support: Add GitHub actions for testing with MSVC and MSYS2
lfittl Jan 1, 2024
8b58b8a
Windows support: Don't use CRLFs for regression test .sql files
lfittl Jan 1, 2024
1ec3894
Release 16-5.1.0
lfittl Jan 9, 2024
0779c5e
Track the extent of tokens UIDENT and USCONST
ewie Apr 4, 2024
c3ed78b
Add psqlparse2 to README
dani-maarouf May 17, 2024
d49cc8e
Update README.md
pyramation May 3, 2024
43bad3c
Add option to normalize only utility statements
seanlinsley Aug 6, 2024
967fbee
add pg_query.rs to README
lemonadern Sep 16, 2024
972c748
Fix parsing of negative integer constants (#249)
msullivan Sep 21, 2024
680f5ee
Fix datatype handling for plpgsql function parameters (#256)
svenklemm Sep 24, 2024
9a6fb9e
PL/pgSQL: Detect fully qualified argument types outside of pg_catalog…
lfittl Sep 24, 2024
dfbee11
PL/pgSQL: Fix handling of ALIAS FOR for positional function argument …
lfittl Sep 24, 2024
b96fdd2
PL/pgSQL: Handle implicit RETURN statements by correctly setting out_…
lfittl Sep 24, 2024
fa958ce
PL/pgSQL: Fix handling lowercase "record" keyword by using case-insen…
lfittl Sep 24, 2024
975c7a9
PL/pgSQL: Add support for declaration of cursors
lfittl Sep 24, 2024
115885c
PL/pgSQL: Add support for variables declared with a collation
lfittl Sep 24, 2024
0667029
PL/pgSQL: Uncomment additional test case that no longer fails
lfittl Sep 24, 2024
2f8cfdb
Bump Makefile version
msepga Sep 26, 2024
ea4e8ef
Update patches
msepga Sep 26, 2024
8deffd6
Mock plpgsql_build_datatype_arrayof
msepga Sep 26, 2024
6d0f860
Include `xlocale.h` on macOS for `locale_t`
msepga Sep 26, 2024
bec3a1b
Add extra idents in zero-length delimiter patch
msepga Sep 26, 2024
be4a5f1
Build generated header files
msepga Sep 26, 2024
c783b9f
Avoid generating hash table functions for namespace catalog
msepga Sep 26, 2024
ffe8315
Add more files to blocklist
msepga Sep 26, 2024
b7dda68
Resolve more functions
msepga Sep 26, 2024
d95b40a
Add support for abstract nodes in generator scripts
msepga Sep 27, 2024
364a67b
Update protobuf, fingerprint types
msepga Sep 26, 2024
abee5da
Run `make extract_source`
msepga Sep 26, 2024
d907ad5
Run `./scripts/extract_headers.rb`
msepga Sep 26, 2024
213cf32
Bump version in expected parse test outputs
msepga Sep 26, 2024
6e80c05
Add `disableOnMsvc` option to fingerprint test generator
msepga Sep 26, 2024
b48fa0b
Update expected fingerprint hashes
msepga Sep 26, 2024
7fa3020
Update expected version in parse tests
msepga Sep 26, 2024
54dae5f
Run `./scripts/generate_fingerprint_tests.rb`
msepga Sep 26, 2024
040789f
Run `./scripts/generate_protobuf_and_funcs.rb`
msepga Sep 26, 2024
04ae0b8
Run `./scripts/generate_fingerprint_outfuncs.rb`
msepga Sep 26, 2024
44eec8d
Run `make protobuf/pg_query.pb*.{c,cc,h}`
msepga Sep 26, 2024
818bc27
Deparse `NOT MATCHED [ BY TARGET ]`
msepga Sep 26, 2024
4c2aae0
Deparse `MERGE ... RETURNING`
msepga Sep 26, 2024
bb48d88
Deparse `merge_action()`
msepga Sep 26, 2024
ba7fb8d
Deparse `... AT LOCAL`
msepga Sep 26, 2024
ff599d2
Deparse `SET ACCESS METHOD DEFAULT`
msepga Sep 26, 2024
491865b
Deparse `SET STATISTICS DEFAULT`
msepga Sep 26, 2024
faf2ef9
Deparse `ALTER COLUMN ... SET EXPRESSION AS`
msepga Sep 26, 2024
5ef97b2
Deparse `COPY ... FORCE_NULL(*)`
msepga Sep 26, 2024
7975940
Deparse `JSON`, `JSON_SCALAR`, `JSON_SERIALIZE`
msepga Sep 26, 2024
97e9efa
Fix deparse for `CREATE DOMAIN ... NOT NULL`
msepga Sep 26, 2024
c24927b
Add new regression tests
msepga Sep 26, 2024
7a0c9d2
Ignore `name_location` in deparse tests
msepga Sep 26, 2024
0d388e4
Deparse `JSON_TABLE`, `JSON_QUERY`, `JSON_EXISTS`, `JSON_VALUE`
msepga Sep 26, 2024
e433b64
Update CHANGELOG and README
msepga Sep 27, 2024
0c69451
Mock `plpgsql_build_datatype_arrayof` with special type handling
msepga Oct 15, 2024
7fb9821
Copy PL/pgSQL regression tests in Makefile
msepga Oct 30, 2024
e1a98c3
Fix cursor quoting in FetchStmt (#267)
rjuju Oct 31, 2024
54517b5
Remove unused deparse node context types
lfittl Dec 17, 2024
36b5a77
Deparser: Add additional comments noting which part of gram.y is related
lfittl Dec 17, 2024
a41b6a3
Deparser: Handle "AexprConst" parser role separately from expressions
lfittl Dec 17, 2024
a203082
Deparser: Set A_EXPR node context for deparseExpr and deparseFuncCall
lfittl Dec 17, 2024
6e60a4f
Deparser: Add parenthesis around AT LOCAL / AT TIMEZONE if needed
lfittl Dec 17, 2024
f412d53
Deparser: Correctly set A_EXPR context in deparseExpr for deparseAExpr
lfittl Dec 17, 2024
27b2af9
Deparser: Add additional test case for DEFAULT in ALTER TABLE
lfittl Dec 18, 2024
caa9300
Manually backport macOS 15.4 fix for strchrnul
lfittl Apr 1, 2025
43a7789
Update GH actions cache module to v4
lfittl Apr 1, 2025
6528a7a
Extract source: Support newer libclang versions
lfittl Apr 2, 2025
f219796
Refresh to 17.4 patch release + subsequent changes planned for 17.5
lfittl Apr 2, 2025
e46bdf8
Add CI target for macOS
lfittl Apr 2, 2025
128aeab
Fix support for older macOS by always defining LOCALE_T_IN_XLOCALE
lfittl Apr 2, 2025
1c1a32e
Release 17-6.1.0
lfittl Apr 2, 2025
2e02616
Deparser: Fix the null pointer dereference when handling identity col…
QiuYitai Apr 12, 2025
d00c096
Keep Postgres COPYRIGHT file in src/postgres directory (#283)
lfittl Apr 15, 2025
fb3cdc6
Removed the subtree
asacalow Apr 22, 2025
a2898b4
Add 'c_src/libpg_query/' from commit 'd00c096f3180721799a26c74996288c…
asacalow Apr 22, 2025
1b0b5a7
Regenerated the ex bindings with `make protobuf`, and bumped the vers…
asacalow Apr 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions c_src/libpg_query/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sql binary
64 changes: 54 additions & 10 deletions c_src/libpg_query/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ jobs:
valgrind: [valgrind,no-valgrind]
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Cache protobuf library
if: matrix.protobuf_lib == 'protobuf-cpp'
id: cache-protobuf
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: protobuf-3.14.0
key: ${{ runner.os }}-protobuf-cpp-3.14.0
path: protobuf-25.1
key: ${{ runner.os }}-protobuf-25.1
- name: Build protobuf library
if: matrix.protobuf_lib == 'protobuf-cpp' && steps.cache-protobuf.outputs.cache-hit != 'true'
run: |
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/protobuf-cpp-3.14.0.tar.gz
tar -xf protobuf-cpp-3.14.0.tar.gz
cd protobuf-3.14.0
./configure
make
git clone --depth 1 --branch v25.1 https://github.com/protocolbuffers/protobuf.git protobuf-25.1
cd protobuf-25.1
git submodule update --init --recursive
cmake .
cmake --build . --parallel 10
- name: Install protobuf library
if: matrix.protobuf_lib == 'protobuf-cpp'
run: |
cd protobuf-3.14.0
cd protobuf-25.1
sudo make install
sudo ldconfig
- name: Install Valgrind
Expand Down Expand Up @@ -71,3 +71,47 @@ jobs:
run: make $FLAGS
env:
FLAGS: ${{ format('{0} {1} {2}', steps.make_flags.outputs.proto_flags, steps.make_flags.outputs.compiler_flags, steps.make_flags.outputs.debug_flags) }}
build_macos:
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Build and run tests
run: make
build_windows_msvc:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
arch: [x64, x86]
steps:
- name: Configure MSVC developer console
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Check out code
uses: actions/checkout@v4
- name: Build and run tests
run: nmake /F Makefile.msvc
build_windows_msys2:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
sys: [mingw64, mingw32, ucrt64, clang64]
steps:
- name: Set up MSYS2 and compiler
uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
pacboy: >-
toolchain:p
install: >-
make
diffutils
- name: Check out code
uses: actions/checkout@v4
- name: Build and run tests
shell: msys2 {0}
run: |
make
4 changes: 4 additions & 0 deletions c_src/libpg_query/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ postgres.tar.bz2

*.o
*.a
*.obj
pg_query.lib

examples/*
!examples/*.c
Expand All @@ -17,3 +19,5 @@ test/*.dSYM

tmp/*
!tmp/.gitkeep

.vs/*
71 changes: 71 additions & 0 deletions c_src/libpg_query/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,77 @@

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

## 17-6.1.0 2025-04-02

* Update to Postgres 17.4, and add recent patches scheduled for Postgres 17.5 (not yet released)
- Notably, this pulls in support for macOS 15.4 which defines strchrnul
in its standard library, fixing builds on up-to-date macOS versions.
- Deparser improvements
- Add parenthesis around AT LOCAL / AT TIMEZONE if needed
- Correctness improvements related to expressions and function calls

## 17-6.0.0 2024-09-27

* Upgrade to Postgres 17
* Deparser:
- 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 ]`

## 16-5.1.0 2024-01-08

* Add support for compiling on Windows
- In order to build on Windows when using MSVC, use the new "Makefile.msvc"
with nmake, or directly compile all .c files in the src folder into a library
- If compiling directly, add src/postgres/include/port/win32 to the include path,
and when using MSVC also add src/postgres/include/port/win32_msvc
* Add support for compiling on 32-bit systems
- The relevant code is enabled at compile time by checking the pointer
size (__SIZEOF_POINTER__ == 4)
* Move internal headers and included .c files to src/include folder
- This avoids having any .c files in the top-level src/ folder that can't
be directly compiled, and thus lets us simplify the logic for defining
which source units are to be compiled.
* Remove strnlen fallback implementation
* Avoid use of mmap, asprintf and strndup to improve portability
* Improve compatibility with non-POSIX systems and C89 compilers

## 16-5.0.0 2023-12-22

* Update to Postgres 16.1
* Drop support for arbitrary trailing junk on integer literals
- Support for parsing junk after parameters, e.g. `$1OR` is retained
* Deparser:
- Fix deparsing of `SYSTEM_USER`
- Add support for deparsing `STORAGE` mode
- Add support for deparsing `REVOKE ... CASCADE`
- Rework a_expr/b_expr/c_expr deparsing to match gram.y structure
- Add support for deparsing `COMPRESSION` option for columns
- Add support for deparsing `NULLS NOT DISTINCT` in unique constraints
- Add support for deparsing new SQL/JSON functionality

## 15-4.2.4 2023-12-20

* Scanner: Add token `ASCII_36` ("$") to support queries like "SELECT $identifier" [#211](https://github.com/pganalyze/libpg_query/pull/211), [#219](https://github.com/pganalyze/libpg_query/pull/219)
- Whilst these queries are not valid SQL and would fail parsing, this token can show up when using `pg_query_scan` or `pg_query_split_with_scanner` directly
* Normalize: Fix incorrect type cast [#223](https://github.com/pganalyze/libpg_query/pull/223)
* Deparser:
- Fix some `BooleanTest` cases [#206](https://github.com/pganalyze/libpg_query/issues/206)
- Fix `ALTER TABLE ... ENABLE TRIGGER ALL` [#222](https://github.com/pganalyze/libpg_query/pull/222)
- Add parens around type casts in `IndexElem` [#214](https://github.com/pganalyze/libpg_query/pull/214)
- Treat type casts in `func_expr_windowless` as functions [#214](https://github.com/pganalyze/libpg_query/pull/214)
* Support changing parse mode and config settings affecting the parser [#216](https://github.com/pganalyze/libpg_query/pull/216)
- Alternate parse modes are useful for parsing PL/pgSQL expressions, as well as type names
- Additionally, you can now change config settings that affect parsing, like `standard_conforming_strings`
- To pass options, use the new methods ending in `_opts`, e.g. `pg_query_parse_opts`

## 15-4.2.3 2023-07-07

* Fix builds when compiling with `glibc >= 2.38` [#203](https://github.com/pganalyze/libpg_query/pull/203)
Expand Down
Loading