Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7140483

Browse files
committed
Merge branch 'PGPRO10' of gitlab.postgrespro.ru:pgpro-dev/postgrespro into PGPRO10
2 parents f532df7 + 0c47433 commit 7140483

26 files changed

+1711
-169
lines changed

contrib/jsquery/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.deps
2+
/log/
3+
/results/
4+
/tmp_check/
15
*.so
26
*.o
37
jsquery_gram.c

contrib/jsquery/.travis.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
os:
2+
- linux
3+
4+
sudo: required
5+
dist: trusty
6+
7+
language: c
8+
9+
compiler:
10+
- clang
11+
- gcc
12+
13+
before_install:
14+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -y install -qq wget ca-certificates; fi
15+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then source ./travis/dep-ubuntu-postgres.sh; fi
16+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then source ./travis/dep-ubuntu-llvm.sh; fi
17+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq; fi
18+
19+
env:
20+
global:
21+
- LLVM_VER=4.0
22+
matrix:
23+
- PG_VER=10 CHECK_TYPE=normal
24+
- PG_VER=10 CHECK_TYPE=static
25+
- PG_VER=10 CHECK_TYPE=valgrind
26+
- PG_VER=9.6 CHECK_TYPE=normal
27+
- PG_VER=9.6 CHECK_TYPE=static
28+
- PG_VER=9.5 CHECK_TYPE=normal
29+
- PG_VER=9.5 CHECK_TYPE=static
30+
- PG_VER=9.4 CHECK_TYPE=normal
31+
- PG_VER=9.4 CHECK_TYPE=static
32+
33+
script: bash ./travis/pg-travis-test.sh

contrib/jsquery/LICENSE

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
JsQuery is released under the PostgreSQL License, a liberal Open Source license, similar to the BSD or MIT licenses.
2+
3+
Copyright (c) 2014-2018, Postgres Professional
4+
Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
5+
Portions Copyright (c) 1994, The Regents of the University of California
6+
7+
Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.
8+
9+
IN NO EVENT SHALL POSTGRES PROFESSIONAL BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF POSTGRES PROFESSIONAL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10+
11+
POSTGRES PROFESSIONAL SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND POSTGRES PROFESSIONAL HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

contrib/jsquery/META.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "JsQuery",
33
"abstract": "JSON Query Language with GIN indexing support",
44
"description": "JsQuery provides additional functionality for JSONB, such as a simple and effective way to search in nested objects and arrays, and more comparison operators with index support. It does this by implementing a specialized search syntax, the @@ operator, and the jsquery type for search strings.",
5-
"version": "1.0.0",
5+
"version": "1.0.1",
66
"maintainer": [
77
"Teodor Sigaev <teodor@sigaev.ru>",
88
"Alexander Korotkov <aekorotkov@gmail.com>",
@@ -17,15 +17,15 @@
1717
"PostgreSQL": "9.4.0"
1818
},
1919
"recommends": {
20-
"PostgreSQL": "9.4.0"
20+
"PostgreSQL": "9.6.5"
2121
}
2222
}
2323
},
2424
"provides": {
2525
"jsquery": {
2626
"file": "sql/jsquery.sql",
2727
"docfile": "README.md",
28-
"version": "1.0.0",
28+
"version": "1.0.1",
2929
"abstract": "JSON query language with GIN indexing support"
3030
}
3131
},
@@ -50,4 +50,4 @@
5050
"index",
5151
"search"
5252
]
53-
}
53+
}

contrib/jsquery/Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ OBJS = jsonb_gin_ops.o jsquery_constr.o jsquery_extract.o \
55
jsquery_gram.o jsquery_io.o jsquery_op.o jsquery_support.o
66

77
EXTENSION = jsquery
8-
DATA = jsquery--1.0.sql
8+
DATA = jsquery--1.1.sql jsquery--1.0--1.1.sql
9+
INCLUDES = jsquery.h
910

1011
REGRESS = jsquery
1112
# We need a UTF8 database
@@ -25,6 +26,10 @@ include $(top_builddir)/src/Makefile.global
2526
include $(top_srcdir)/contrib/contrib-global.mk
2627
endif
2728

29+
ifdef USE_ASSERT_CHECKING
30+
override CFLAGS += -DUSE_ASSERT_CHECKING
31+
endif
32+
2833
jsquery_gram.o: jsquery_scan.c
2934

3035
jsquery_gram.c: BISONFLAGS += -d
@@ -34,3 +39,7 @@ distprep: jsquery_gram.c jsquery_scan.c
3439
maintainer-clean:
3540
rm -f jsquery_gram.c jsquery_scan.c jsquery_gram.h
3641

42+
install: installincludes
43+
44+
installincludes:
45+
$(INSTALL_DATA) $(addprefix $(srcdir)/, $(INCLUDES)) '$(DESTDIR)$(includedir_server)/'

contrib/jsquery/README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[![Build Status](https://travis-ci.org/postgrespro/jsquery.svg?branch=master)](https://travis-ci.org/postgrespro/jsquery)
2+
[![codecov](https://codecov.io/gh/postgrespro/jsquery/branch/master/graph/badge.svg)](https://codecov.io/gh/postgrespro/jsquery)
3+
[![GitHub license](https://img.shields.io/badge/license-PostgreSQL-blue.svg)](https://raw.githubusercontent.com/postgrespro/jsquery/master/LICENSE)
4+
15
JsQuery – json query language with GIN indexing support
26
=======================================================
37

@@ -36,7 +40,7 @@ and supports PostgreSQL 9.4+.
3640
Regards
3741
-------
3842

39-
Development is sponsored by [Wargaming.net](http://wargaming.net).
43+
Development was sponsored by [Wargaming.net](http://wargaming.net).
4044

4145
Installation
4246
------------
@@ -89,6 +93,7 @@ the simplest case path is just an key name. In general path is key names and
8993
placeholders combined by dot signs. Path can use following placeholders:
9094

9195
* `#` – any index of array;
96+
* `#N` – N-th index of array;
9297
* `%` – any key of object;
9398
* `*` – any sequence of array indexes and object keys;
9499
* `@#` – length of array or object, could be only used as last component of

contrib/jsquery/data/test_jsquery.data

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,3 +1015,20 @@
10151015
{"t": "a"}
10161016
{"t": true}
10171017
{"t": false}
1018+
[1, 2, 3]
1019+
["a", "b", "c"]
1020+
1
1021+
2
1022+
3
1023+
4
1024+
5
1025+
null
1026+
null
1027+
null
1028+
false
1029+
false
1030+
true
1031+
"aaa"
1032+
"bbb"
1033+
"ccc"
1034+
"ddd"

0 commit comments

Comments
 (0)