Skip to content

Releases: pganalyze/libpg_query

16-5.1.0

09 Jan 04:55
Compare
Choose a tag to compare
  • 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
% shasum -a 256 libpg_query-16-5.1.0.*
31f25b573da1c966bc762b0313b0a50cdd03aabdbaf666d90469eddcb1656df7  libpg_query-16-5.1.0.tar.gz
35b73753428435e1da10a7a4fc6e61fcdf1819c9527ba5515f1035697c3e0ab7  libpg_query-16-5.1.0.zip

16-5.0.0

22 Dec 23:58
2a00188
Compare
Choose a tag to compare
  • Update to Postgres 16.1 (#225, #229)
  • 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
❯ shasum -a 256 libpg_query-16-5.0.0.*
7cf26922cbc41668fa79332504f2d5638339baa9411912b8df4526ccd1d7029e  libpg_query-16-5.0.0.tar.gz
2a516f977904376ac4969472aa0106818cdca66401f326dead272228def218db  libpg_query-16-5.0.0.zip

15-4.2.4

21 Dec 01:36
db39825
Compare
Choose a tag to compare
  • Scanner: Add token ASCII_36 ("$") to support queries like "SELECT $identifier" #211, #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
  • Deparser:
    • Fix some BooleanTest cases #206
    • Fix ALTER TABLE ... ENABLE TRIGGER ALL #222
    • Add parens around type casts in IndexElem #214
    • Treat type casts in func_expr_windowless as functions #214
  • Support changing parse mode and config settings affecting the parser #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
❯ shasum -a 256 libpg_query-15-4.2.4.*
d0ace0bff40e5daa99e32753a22a7558f9b2207e89260f00171fc50723b831dd  libpg_query-15-4.2.4.tar.gz
dcd43e04ac56db018b7553f0f0d3506be45dd993ae727f7c190a88589573807c  libpg_query-15-4.2.4.zip

15-4.2.3

04 Aug 22:20
9b21e32
Compare
Choose a tag to compare
  • Fix builds when compiling with glibc >= 2.38 #203
  • Deparser: Add support for COALESCE and other expressions in LIMIT clause #199
❯ shasum -a 256 libpg_query-15-4.2.3.*
8b820d63442b1677ce4f0df2a95b3fafdbc520a82901def81217559ec4df9e6b  libpg_query-15-4.2.3.tar.gz
eab782a3fcc5a252044db92d315d54053ac3951e6f10ea849eb70837d26668d4  libpg_query-15-4.2.3.zip

15-4.2.2

08 Jul 02:17
Compare
Choose a tag to compare
  • Deparser:
    • Add support for multi-statement CREATE PROCEDURE definitions #197
    • Correctly quote identifier in ALTER TABLE ... ADD CONSTRAINT [x] #196
    • Add support for index fillfactor within CREATE TABLE, fix SHOW ALL #193
    • Move to dedicated file for easier inclusion in third-party projects #192
% shasum -a 256 libpg_query-15-4.2.2.*
03d6631b4a5ea9cc26cb2569e0303b9cce2bc1c6b6e1488f5ab9d63e6bd5346d  libpg_query-15-4.2.2.tar.gz
2d15b71c3808a3e1ea1e90ce86d4d83dc863bea32d5ad8a9eafcffe0d8197891  libpg_query-15-4.2.2.zip

15-4.2.1

19 May 06:04
1f2d166
Compare
Choose a tag to compare
  • Deparser: Handle INTERVAL correctly when used in SET statements #184
  • Deparser: Ensure index names are quoted as identifiers #182
  • Remove limits.h from pg_query_deparse.c #181
% shasum -a 256 libpg_query-15-4.2.1.*
5828124517d8fd3091336fad6897e16ab49ec0b0b188f5859b3b928fc91608c2  libpg_query-15-4.2.1.tar.gz
9dfd77102825f998a1a2ffa8c5f32aa896e97c4d92b92f5edb8ac89a8491e198  libpg_query-15-4.2.1.zip

15-4.2.0

06 Feb 22:01
Compare
Choose a tag to compare
  • Update copyright notice years and authors #175
  • Allow trailing junk in numeric literals #177
    • Allows parsing queries like SELECT * FROM a WHERE b=$1ORc=$2
  • NetBSD support #172
❯ shasum -a 256 libpg_query-15-4.2.0.*
573b7b0d3b04702ec9e541e0a504632de17bd90b948c5658e72c1cf9dfc3a05d  libpg_query-15-4.2.0.tar.gz
c457406a0ae3faf85254c7fa34bb5f773630b2e71f67bd54946ceb7f33af0eaf  libpg_query-15-4.2.0.zip

15-4.1.0

11 Jan 16:30
346b34d
Compare
Choose a tag to compare
  • Add Boolean fingerprinting
    • Boolean nodes are now output during fingerprinting
  • Fix parsing issue on 32-bit big endian machines
    • Now we use size_t to indicate the protobuf message size
❯ shasum -a 256 libpg_query-15-4.1.0.*
256fca8ebc64820cb9859cb891027b85fc45d2ccdcbdbc131097087abd733234  libpg_query-15-4.1.0.tar.gz
7f13c46cf458a1a741e803bc8a9fcc71a36058756dfbd312076b1397fd401c93  libpg_query-15-4.1.0.zip

15-4.0.0

13 Dec 17:08
1ada550
Compare
Choose a tag to compare
  • Update to Postgres 15.1
  • Add support for MERGE statements
  • Add support for ALTER TABLE ALL IN TABLESPACE ... statements
  • Add support for publication objects
    • CREATE PUBLICATION foo FOR TABLES IN SCHEMA CURRENT_SCHEMA
  • Deparser now attempts to deparse COPY statements first using the old Postgres 8.4-style syntax (e.g. COPY foo FROM STDIN FREEZE CSV).
❯ shasum -a 256 libpg_query-15-4.0.0.*
1d8a9057b34faed5fa272c6fad8fc706d494b5a877cbe2b582f546660329883d  libpg_query-15-4.0.0.tar.gz
63f88c157db79a58e2b01b0adbd7eecf5181f84f8995a00de21d59d4359831a4  libpg_query-15-4.0.0.zip

14-3.0.0

12 Dec 20:06
Compare
Choose a tag to compare

Special thanks to @wolfgangwalther and @tlisanti for most of the work done on this release.

  • Update to Postgres 14.6
  • Drop support for ? parameter syntax
  • Update fingerprint.json to include newly added tests, regenerate tests
$ shasum -a 256 libpg_query-14-3.0.0.*
59c5cd6d41e36e3f5c9d1179b40190c5429045e211a29527e8500f93a9a75f78  libpg_query-14-3.0.0.tar.gz
dbc7f12526db9cd5f5e1f614992ad41aa93a57172e3d5fccd766fa79307fb0f5  libpg_query-14-3.0.0.zip