Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbfa87d1

Browse files
committed
make beauty
1 parent910f9aa commitbfa87d1

File tree

5 files changed

+50
-18
lines changed

5 files changed

+50
-18
lines changed

‎jsonb_gin_ops.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* jsonb_gin_ops.c
4+
* Support GIN over jsonb with jsquery operation
5+
*
6+
* Copyright (c) 2014, PostgreSQL Global Development Group
7+
* Author: Alexander Korotkov <aekorotkov@gmail.com>
8+
*
9+
* IDENTIFICATION
10+
* contrib/jsquery/jsonb_gin_ops.c
11+
*
12+
*-------------------------------------------------------------------------
13+
*/
14+
115
#include"postgres.h"
216

317
#include"access/hash.h"

‎jsquery.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ typedef enum JsQueryItemType {
5454
jqiIn='I'
5555
}JsQueryItemType;
5656

57+
/*
58+
* Support functions to parse/construct binary value
59+
*/
60+
5761
typedefstructJsQueryItem {
5862
JsQueryItemTypetype;
5963
int32nextPos;
@@ -94,6 +98,8 @@ extern char * jsqGetString(JsQueryItem *v, int32 *len);
9498
externvoidjsqIterateInit(JsQueryItem*v);
9599
externbooljsqIterateArray(JsQueryItem*v,JsQueryItem*e);
96100

101+
voidalignStringInfoInt(StringInfobuf);
102+
97103
/*
98104
* Parsing
99105
*/
@@ -128,8 +134,6 @@ struct JsQueryParseItem {
128134

129135
externJsQueryParseItem*parsejsquery(constchar*str,intlen);
130136

131-
voidalignStringInfoInt(StringInfobuf);
132-
133137
/* jsquery_extract.c */
134138

135139
typedefenum

‎jsquery_extract.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* jsquery_extract.c
4+
* Functions and operations to support jsquery in indexes
5+
*
6+
* Copyright (c) 2014, PostgreSQL Global Development Group
7+
* Author: Alexander Korotkov <aekorotkov@gmail.com>
8+
*
9+
* IDENTIFICATION
10+
* contrib/jsquery/jsquery_extract.c
11+
*
12+
*-------------------------------------------------------------------------
13+
*/
14+
115
#include"postgres.h"
216

317
#include"access/gin.h"

‎jsquery_io.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,6 @@
2222

2323
PG_MODULE_MAGIC;
2424

25-
void
26-
alignStringInfoInt(StringInfobuf)
27-
{
28-
switch(INTALIGN(buf->len)-buf->len)
29-
{
30-
case3:
31-
appendStringInfoCharMacro(buf,0);
32-
case2:
33-
appendStringInfoCharMacro(buf,0);
34-
case1:
35-
appendStringInfoCharMacro(buf,0);
36-
default:
37-
break;
38-
}
39-
}
40-
4125
staticint
4226
flattenJsQueryParseItem(StringInfobuf,JsQueryParseItem*item)
4327
{

‎jsquery_support.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,22 @@
2626
(p) += sizeof(int32);\
2727
} while(0)\
2828

29+
void
30+
alignStringInfoInt(StringInfobuf)
31+
{
32+
switch(INTALIGN(buf->len)-buf->len)
33+
{
34+
case3:
35+
appendStringInfoCharMacro(buf,0);
36+
case2:
37+
appendStringInfoCharMacro(buf,0);
38+
case1:
39+
appendStringInfoCharMacro(buf,0);
40+
default:
41+
break;
42+
}
43+
}
44+
2945
void
3046
jsqInit(JsQueryItem*v,JsQuery*js)
3147
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp