pgsql: Refactoring by Heikki Linnakangas <heikki@enterprisedb.com> with

From: teodor(at)postgresql(dot)org (Teodor Sigaev)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Refactoring by Heikki Linnakangas <heikki@enterprisedb.com> with
Date: 2007-09-07 15:09:56
Message-ID: 20070907150956.354B5754201@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Refactoring by Heikki Linnakangas <heikki(at)enterprisedb(dot)com> with
small editorization by me

- Brake the QueryItem struct into QueryOperator and QueryOperand.
Type was really the only common field between them. QueryItem still
exists, and is used in the TSQuery struct as before, but it's now a
union of the two. Many other changes fell from that, like separation
of pushval_asis function into pushValue, pushOperator and pushStop.

- Moved some structs that were for internal use only from header files
to the right .c-files.

- Moved tsvector parser to a new tsvector_parser.c file. Parser code was
about half of the size of tsvector.c, it's also used from tsquery.c, and
it has some data structures of its own, so it seems better to separate
it. Cleaned up the API so that TSVectorParserState is not accessed from
outside tsvector_parser.c.

- Separated enumerations (#defines, really) used for QueryItem.type
field and as return codes from gettoken_query. It was just accidental
code sharing.

- Removed ParseQueryNode struct used internally by makepol and friends.
push*-functions now construct QueryItems directly.

- Changed int4 variables to just ints for variables like "i" or "array
size", where the storage-size was not significant.

Modified Files:
--------------
pgsql/src/backend/tsearch:
to_tsany.c (r1.1 -> r1.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/tsearch/to_tsany.c?r1=1.1&r2=1.2)
ts_parse.c (r1.2 -> r1.3)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/tsearch/ts_parse.c?r1=1.2&r2=1.3)
wparser_def.c (r1.2 -> r1.3)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/tsearch/wparser_def.c?r1=1.2&r2=1.3)
pgsql/src/backend/utils/adt:
Makefile (r1.66 -> r1.67)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/Makefile?r1=1.66&r2=1.67)
tsginidx.c (r1.1 -> r1.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/tsginidx.c?r1=1.1&r2=1.2)
tsgistidx.c (r1.2 -> r1.3)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/tsgistidx.c?r1=1.2&r2=1.3)
tsquery.c (r1.2 -> r1.3)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/tsquery.c?r1=1.2&r2=1.3)
tsquery_cleanup.c (r1.1 -> r1.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/tsquery_cleanup.c?r1=1.1&r2=1.2)
tsquery_op.c (r1.1 -> r1.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/tsquery_op.c?r1=1.1&r2=1.2)
tsquery_rewrite.c (r1.1 -> r1.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/tsquery_rewrite.c?r1=1.1&r2=1.2)
tsquery_util.c (r1.1 -> r1.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/tsquery_util.c?r1=1.1&r2=1.2)
tsrank.c (r1.1 -> r1.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/tsrank.c?r1=1.1&r2=1.2)
tsvector.c (r1.2 -> r1.3)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/tsvector.c?r1=1.2&r2=1.3)
tsvector_op.c (r1.2 -> r1.3)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/tsvector_op.c?r1=1.2&r2=1.3)
pgsql/src/include/tsearch:
ts_public.h (r1.3 -> r1.4)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/tsearch/ts_public.h?r1=1.3&r2=1.4)
ts_type.h (r1.1 -> r1.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/tsearch/ts_type.h?r1=1.1&r2=1.2)
ts_utils.h (r1.2 -> r1.3)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/tsearch/ts_utils.h?r1=1.2&r2=1.3)

Added Files:
-----------
pgsql/src/backend/utils/adt:
tsvector_parser.c (r1.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/tsvector_parser.c?rev=1.1&content-type=text/x-cvsweb-markup)

Browse pgsql-committers by date

  From Date Subject
Next Message Teodor Sigaev 2007-09-07 15:35:11 pgsql: Improving various checks by Heikki Linnakangas
Previous Message Teodor Sigaev 2007-09-07 14:46:43 pgsql: Add turkish stopword list.