Re: [HACKERS] Remove 1MB size limit in tsvector
От | Alexander Korotkov |
---|---|
Тема | Re: [HACKERS] Remove 1MB size limit in tsvector |
Дата | |
Msg-id | CAPpHfdsAuoyUG0dP+yB2=fo0rOEoL0x5cx-wZC_GwHY7vca8GQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Remove 1MB size limit in tsvector (Michael Paquier <michael.paquier@gmail.com>) |
Ответы |
Re: [HACKERS] Remove 1MB size limit in tsvector
|
Список | pgsql-hackers |
On Thu, Aug 10, 2017 at 7:37 AM, Michael Paquier <michael.paquier@gmail.com> wrote:
On Wed, Aug 9, 2017 at 6:38 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> The patch doesn't really conform to our coding standards, though, so
> you need to clean it up (or, if you're not sure what you need to do,
> you need to have someone who knows how PostgreSQL code needs to look
> review it for you).
The documentation has a couple of rules for coding conventions:
https://www.postgresql.org/docs/9.6/static/source.html
+1
Ildus, from the first glance I see at least following violations of PostgreSQL coding standards in your code.
+/*
+ * Converts tsvector with the old structure to current.
+ * @orig - tsvector to convert,
+ * @copy - return copy of tsvector, it has a meaning when tsvector doensn't
+ * need to be converted.
+ */
This comment will be reflowed by pgindent. Also we don't use '@' for parameters description in comments.
+TSVector
+tsvector_upgrade(Datum orig, bool copy)
+{
+ int i,
+ dataoff = 0,
+ datalen = 0,
+ totallen;
+ TSVector in,
+ out;
You have random mix of tabs and spaces here.
+ {
+ stroff = SHORTALIGN(stroff); \
+ entry->hasoff = 0;
+ entry->len = lexeme_len;
+ entry->npos = npos;
+ }
What this backslash is doing here?
There are other similar (and probably different) violations of coding standard over the code. Ildus, please check you patches carefully before publishing.
------
Alexander Korotkov
Postgres Professional: http://www. postgrespro.com
The Russian Postgres Company
Alexander Korotkov
Postgres Professional: http://www.
The Russian Postgres Company
В списке pgsql-hackers по дате отправления: