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

Appearance settings

Commit 978de9d

Browse filesBrowse files
committed
Improvements from Heikki Linnakangas <heikki@enterprisedb.com>
- change the alignment requirement of lexemes in TSVector slightly. Lexeme strings were always padded to 2-byte aligned length to make sure that if there's position array (uint16[]) it has the right alignment. The patch changes that so that the padding is not done when there's no positions. That makes the storage of tsvectors without positions slightly more compact. - added some #include "miscadmin.h" lines I missed in the earlier when I added calls to check_stack_depth(). - Reimplement the send/recv functions, and added a comment above them describing the on-wire format. The CRC is now recalculated in tsquery as well per previous discussion.
1 parent 8983852 commit 978de9d
Copy full SHA for 978de9d

File tree

Expand file treeCollapse file tree

9 files changed

+286
-219
lines changed
Filter options
Expand file treeCollapse file tree

9 files changed

+286
-219
lines changed

‎src/backend/utils/adt/tsginidx.c

Copy file name to clipboardExpand all lines: src/backend/utils/adt/tsginidx.c
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/utils/adt/tsginidx.c,v 1.2 2007/09/07 15:09:56 teodor Exp $
10+
* $PostgreSQL: pgsql/src/backend/utils/adt/tsginidx.c,v 1.3 2007/09/07 16:03:40 teodor Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -22,7 +22,7 @@ Datum
2222
gin_extract_tsvector(PG_FUNCTION_ARGS)
2323
{
2424
TSVector vector = PG_GETARG_TSVECTOR(0);
25-
uint32 *nentries = (uint32 *) PG_GETARG_POINTER(1);
25+
int32 *nentries = (int32 *) PG_GETARG_POINTER(1);
2626
Datum *entries = NULL;
2727

2828
*nentries = 0;
@@ -55,7 +55,7 @@ Datum
5555
gin_extract_query(PG_FUNCTION_ARGS)
5656
{
5757
TSQuery query = PG_GETARG_TSQUERY(0);
58-
uint32 *nentries = (uint32 *) PG_GETARG_POINTER(1);
58+
int32 *nentries = (int32 *) PG_GETARG_POINTER(1);
5959
StrategyNumber strategy = PG_GETARG_UINT16(2);
6060
Datum *entries = NULL;
6161

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.