Skip to content

Commit

Permalink
Update repository references to github.com/pganalyze/libpg_query
Browse files Browse the repository at this point in the history
This repository has been moved from github.com/lfittl/libpg_query
to github.com/pganalyze/libpg_query to reflect the primary organization
that funds pg_query development.

This move brings no other changes, and the license is the same as before
(MIT License).
  • Loading branch information
lfittl committed Mar 18, 2021
1 parent 41b782d commit 6517eed
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ All versions are tagged by the major Postgres version, plus an individual semver
the pg_query Ruby library, and is now accessible for all bindings through
this new API and implementation.
* Fingerprinting: Introduce v3 version and 64-bit XXH3 hash
- See full details in the wiki page here: https://github.com/lfittl/libpg_query/wiki/Fingerprinting#version-30-based-on-postgresql-13
- See full details in the wiki page here: https://github.com/pganalyze/libpg_query/wiki/Fingerprinting#version-30-based-on-postgresql-13
* Add new pg_query_split_with_scanner/pg_query_split_with_parser functions to
split up multi-statement strings
- Naively one could assume that splitting a string by ";" is sufficient,
Expand Down Expand Up @@ -73,7 +73,7 @@ All versions are tagged by the major Postgres version, plus an individual semver
to this library). In addition, primarily for memory testing purposes, add a
new method "pg_query_exit" that performs the same cleanup on demand.
* Resolve correctness issues and possible memory leak in PL/pgSQL parser
* Add arch-ppc.h for PPC architectures [#80](https://github.com/lfittl/libpg_query/pull/80) [@pkubaj](https://github.com/pkubaj)
* Add arch-ppc.h for PPC architectures [#80](https://github.com/pganalyze/libpg_query/pull/80) [@pkubaj](https://github.com/pkubaj)


## 10-1.0.4 2020-12-27
Expand Down Expand Up @@ -175,7 +175,7 @@ All versions are tagged by the major Postgres version, plus an individual semver
* Only ignore ResTarget.name when parent field name is targetList *and*
we have a SelectStmt as a parent node (fixes UpdateStmt fingerprinting)
* Normalize the password in ALTER ROLE ... PASSWORD '123' statements
* Make library thread-safe through thread-local storage [#13](https://github.com/lfittl/libpg_query/issues/13)
* Make library thread-safe through thread-local storage [#13](https://github.com/pganalyze/libpg_query/issues/13)


## 9.5-1.3.0 2016-05-31
Expand All @@ -188,12 +188,12 @@ All versions are tagged by the major Postgres version, plus an individual semver

## 9.5-1.2.1 2016-05-17

* Make sure we encode special characters correctly in JSON output ([@zhm](https://github.com/zhm) [#11](https://github.com/lfittl/libpg_query/pull/11))
* Make sure we encode special characters correctly in JSON output ([@zhm](https://github.com/zhm) [#11](https://github.com/pganalyze/libpg_query/pull/11))


## 9.5-1.2.0 2016-05-16

* Fix stack overflow when parsing CREATE FOREIGN TABLE ([#9](https://github.com/lfittl/libpg_query/issues/9))
* Fix stack overflow when parsing CREATE FOREIGN TABLE ([#9](https://github.com/pganalyze/libpg_query/issues/9))
* Update to PostgreSQL 9.5.3


Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ C library for accessing the PostgreSQL parser outside of the server.

This library uses the actual PostgreSQL server source to parse SQL queries and return the internal PostgreSQL parse tree.

Note that this is mostly intended as a base library for [pg_query](https://github.com/lfittl/pg_query) (Ruby), [pg_query.go](https://github.com/lfittl/pg_query.go) (Go), [pg-query-parser](https://github.com/zhm/pg-query-parser) (Node), [psqlparse](https://github.com/alculquicondor/psqlparse) (Python) and [pglast](https://pypi.org/project/pglast/) (Python 3).
Note that this is mostly intended as a base library for [pg_query](https://github.com/pganalyze/pg_query) (Ruby), [pg_query.go](https://github.com/pganalyze/pg_query_go) (Go), [pg-query-parser](https://github.com/zhm/pg-query-parser) (Node), [psqlparse](https://github.com/alculquicondor/psqlparse) (Python) and [pglast](https://pypi.org/project/pglast/) (Python 3).

You can find further background to why a query's parse tree is useful here: https://pganalyze.com/blog/parse-postgresql-queries-in-ruby.html


## Installation

```sh
git clone -b 13-latest git://github.com/lfittl/libpg_query
git clone -b 13-latest git://github.com/pganalyze/libpg_query
cd libpg_query
make
```
Expand All @@ -24,7 +24,7 @@ For a production build, its best to use a specific git tag (see CHANGELOG).

## Usage: Parsing a query

A [full example](https://github.com/lfittl/libpg_query/blob/master/examples/simple.c) that parses a query looks like this:
A [full example](https://github.com/pganalyze/libpg_query/blob/master/examples/simple.c) that parses a query looks like this:

```c
#include <pg_query.h>
Expand Down Expand Up @@ -177,11 +177,11 @@ This will output:
50fde20626009aba
```

See https://github.com/lfittl/libpg_query/wiki/Fingerprinting for the full fingerprinting rules.
See https://github.com/pganalyze/libpg_query/wiki/Fingerprinting for the full fingerprinting rules.

## Usage: Parsing a PL/pgSQL function (Experimental)

A [full example](https://github.com/lfittl/libpg_query/blob/master/examples/simple_plpgsql.c) that parses a [PL/pgSQL](https://www.postgresql.org/docs/current/static/plpgsql.html) method looks like this:
A [full example](https://github.com/pganalyze/libpg_query/blob/master/examples/simple_plpgsql.c) that parses a [PL/pgSQL](https://www.postgresql.org/docs/current/static/plpgsql.html) method looks like this:

```c
#include <pg_query.h>
Expand Down Expand Up @@ -243,10 +243,10 @@ Each major version is maintained in a dedicated git branch. Only the latest Post
pg_query wrappers in other languages:
* Ruby: [pg_query](https://github.com/lfittl/pg_query)
* Go: [pg_query_go](https://github.com/lfittl/pg_query_go)
* Ruby: [pg_query](https://github.com/pganalyze/pg_query)
* Go: [pg_query_go](https://github.com/pganalyze/pg_query_go)
* Javascript (Node): [pgsql-parser](https://github.com/pyramation/pgsql-parser)
* Javascript (Browser): [pg-query-emscripten](https://github.com/lfittl/pg-query-emscripten)
* Javascript (Browser): [pg-query-emscripten](https://github.com/pganalyze/pg-query-emscripten)
* Python: [psqlparse](https://github.com/alculquicondor/psqlparse), [pglast](https://github.com/lelit/pglast)
* OCaml: [pg_query-ocaml](https://github.com/roddyyaga/pg_query-ocaml)
Expand All @@ -262,7 +262,7 @@ Products, tools and libraries built on pg_query:
* [DuckDB](https://github.com/cwida/duckdb) ([details](https://github.com/cwida/duckdb/tree/master/third_party/libpg_query))
* and more
Please feel free to [open a PR](https://github.com/lfittl/libpg_query/pull/new/master) to add yours! :)
Please feel free to [open a PR](https://github.com/pganalyze/libpg_query/pull/new/master) to add yours! :)
## Authors
Expand Down

0 comments on commit 6517eed

Please sign in to comment.