Re: [HACKERS] IF NOT EXISTS option for CREATE SERVER and CREATE USER MAPPING statements

2017-03-13 Thread Artur Zakirov
tests are passed. Marked the patch as "Ready for Commiter". -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mail

Re: [HACKERS] IF NOT EXISTS option for CREATE SERVER and CREATE USER MAPPING statements

2017-03-13 Thread Artur Zakirov
n->if_not_exists = true; $$ = (Node *) n; } ; Here ALTER USER MAPPING and CREATE USER MAPPING commands were mixed. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers

Re: [HACKERS] Should buffer of initialization fork have a BM_PERMANENT flag

2017-03-10 Thread Artur Zakirov
On 10.03.2017 04:00, Michael Paquier wrote: On Thu, Mar 9, 2017 at 10:25 PM, Artur Zakirov wrote: I think this is good fixes. I've checked them. And in my opinion they are correct. The code also is good. Having something with conflicts is not nice, so attached is a rebased version.

Re: [HACKERS] Should buffer of initialization fork have a BM_PERMANENT flag

2017-03-09 Thread Artur Zakirov
applying the patch server doesn't crash on vacuum command. I have run regression and TAP tests. They all passed without error. I think the patch can be marked as "Ready for Committer" after rebase. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Post

Re: [HACKERS] Bug in to_timestamp().

2017-02-27 Thread Artur Zakirov
applies to the top of master HEAD cleanly & make check-world also fine. - Tom Lane's review comments are fixed. The new status of this patch is: Ready for Committer Thank you for your review! -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [HACKERS] [PATCH] Generic type subscription

2017-01-15 Thread Artur Zakirov
s/syscache.h" > #include "utils/memutils.h" I think "utils/syscache.h" isn't necessary here. PostgreSQL could be compiled without this include. I suppose that this patch can be marked as "Ready for commiter". Any opinions? -- Artur Zakirov Postgres

Re: [HACKERS] [PATCH] Generic type subscription

2017-01-04 Thread Artur Zakirov
dularity and performance. We had to change it to > a separate node type, which I just got finished doing. Don't go down that > path. While you're at it, I'd advise that fetch and assignment be two > different node types rather than copying ArrayRef's bad precedent of using

Re: [HACKERS] [PATCH] Generic type subscription

2016-12-26 Thread Artur Zakirov
estions/improvements, or this patch is in good enough shape? Would you rebase the patch, please? It seems it is necessary. It can't be applied now. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pg

Re: [HACKERS] [BUG?] pg_event_trigger_ddl_commands() error with ALTER TEXT SEARCH CONFIGURATION

2016-12-21 Thread Artur Zakirov
an a bugfix, no? > Yes, agree with you. It should be added as a separate patch. I think I will deal with it. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company diff --git a/src/backend/commands/tsearchcmds.c b/src/backend/commands/tsearchcmds.c

Re: [HACKERS] Rethinking our fulltext phrase-search implementation

2016-12-21 Thread Artur Zakirov
elect 'a b a c' @@ 'a <-> (b & c)'::tsquery; ?column? -- f (1 row) I agree that such query is confusing. Maybe it is better to return true for such queries? Otherwise it seems that queries like 'a <-> (b & c)' will always return fal

Re: [HACKERS] [sqlsmith] Crash in tsquery_rewrite/QTNBinary

2016-12-10 Thread Artur Zakirov
es above we need recursive dropvoidsubtree() function. Without this patch this function cleans only first level of tree. And query above becomes: '6 | void'. Firstly I made recursive dropvoidsubtree(). But attached patch cleans query tree in dofindsubquery() to avoid extra tree scan. -- Artu

Re: [HACKERS] [BUG?] pg_event_trigger_ddl_commands() error with ALTER TEXT SEARCH CONFIGURATION

2016-11-28 Thread Artur Zakirov
y I added the patch to https://commitfest.postgresql.org/12/895/ I added it to the next commitfest. Because we are in the end of the current commitfest. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql

Re: [HACKERS] proposal: session server side variables

2016-11-28 Thread Artur Zakirov
10 | Hello world, Hello world, Hello world 1000 | Hola, hola! Or it is a bad idea? Or it is not related to this patch? We have the extension (https://github.com/postgrespro/pg_variables). And it supports table like variables. It shows better performance against temporary tabl

Re: [HACKERS] [BUG?] pg_event_trigger_ddl_commands() error with ALTER TEXT SEARCH CONFIGURATION

2016-11-27 Thread Artur Zakirov
can be done using new entry in the CollectedCommandType structure maybe. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company diff --git a/src/backend/commands/tsearchcmds.c b/src/backend/commands/tsearchcmds.c index b240113..2b84848 100644 --- a/src/backen

[HACKERS] Re: [HACKERS] Re: [PATCH] Tab completion for ALTER TYPE … RENAME VALUE …

2016-11-06 Thread Artur Zakirov
R TYPE rainbow RENAME ATTRIBUTE TO VALUE => ALTER TYPE rainbow RENAME VALUE 'blue''green' 'orange' 'purple' 'red' 'yellow' It seems that the patch can be commited without any fixes. So I marked it as "Ready for Comm

Re: [HACKERS] Bug in to_timestamp().

2016-11-06 Thread Artur Zakirov
Thank you for your comments, 2016-11-04 20:36 GMT+02:00 Tom Lane : > > Artur Zakirov writes: > > I attached new version of the patch, which fix is_char_separator() > > declaration too. > > I did some experimenting using > http://rextester.com/l/oracle_online_compiler &

Re: [HACKERS] [PATCH] Generic type subscription

2016-11-03 Thread Artur Zakirov
QUERY PLAN ---- Seq Scan on test (cost=0.00..5286.00 rows=10 width=6) (actual time=0.024..98.475 rows=10 loops=1) Planning time: 0.081 ms Execution time: 105.055 ms (3 rows) -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [HACKERS] FTS Configuration option

2016-10-13 Thread Artur Zakirov
velop this feature. Then I will develop it :). But I suppose I can do it a few days or weeks later, because I have other tasks with higher priority. BTW, I've already implemented USING option a few weeks before https://github.com/select-artur/postgres/tree/join_tsconfig . But of course

Re: [HACKERS] FTS Configuration option

2016-10-12 Thread Artur Zakirov
solution. Of course if this syntax will be implemented, old syntax with commas also should be maintained. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] FTS Configuration option

2016-10-10 Thread Artur Zakirov
simple. - found lexems in both dictionaries. Return lexems from both. Could be such option is useful to the community? Name of the option is debatable. Thank you! -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers m

[HACKERS] FTS Configuration option

2016-10-10 Thread Artur Zakirov
le. - found lexems in both dictionaries. Return lexems from both. Could be such option is useful to the community? Name of the option is debatable. Thank you! -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-

Re: [HACKERS] [PATCH] Generic type subscription

2016-10-05 Thread Artur Zakirov
l static. - JsonbValue v; + JsonbValue v, *new = (JsonbValue *) newval; Is declaration of "new" variable necessary here? I think it is extra declaration. Also its name may bring some problems. For example, there is a thread where guys try to port PostgreSQL to C++. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Bug in to_timestamp().

2016-09-29 Thread Artur Zakirov
-v5.patch. It seems nice to me. I suppose it is necessary to fix is_char_separator() declaration. from: static bool is_char_separator(char *str); to: static bool is_char_separator(const char *str); Because now in parse_format() *str argument is const. I attached new version of the patch, whic

Re: [HACKERS] Bug in to_timestamp().

2016-09-16 Thread Artur Zakirov
s no need to rebase patches. But I will not be able to fix patches for two weeks because of travel if someone will have a note or remark. So it would be nice if someone will be able to fix possible issues for above reasone. -- Artur Zakirov Postgres Professional: http://www.postgrespro.c

Re: [HACKERS] Bug in to_timestamp().

2016-08-25 Thread Artur Zakirov
#x27;ve created the entry in https://commitfest.postgresql.org/10/713/ . You can add yourself as a reviewer. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes t

Re: [HACKERS] Bug in to_timestamp().

2016-08-25 Thread Artur Zakirov
such query: SELECT to_timestamp('---2000JUN', ' MON'); Will be it a proper behaviour? -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 5c1c4f6..36d8b3e 10064

Re: [HACKERS] Bug in to_timestamp().

2016-08-24 Thread Artur Zakirov
ple, you can test incorrect inputs for to_timestamp(). Try to execute such query several times. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 6355300..0fe50e1 100644 --- a/doc/src/sgml

Re: [HACKERS] Bug in to_timestamp().

2016-08-17 Thread Artur Zakirov
h". With it PostgreSQL perform additional checks for date and time. But as I wrote there is another patch in the thread "to_date_valid()" wich differs from this patch. Sincerely, -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company diff --gi

Re: [HACKERS] Bug in to_timestamp().

2016-08-16 Thread Artur Zakirov
thread https://www.postgresql.org/message-id/57786490.9010201%40wars-nicht.de . That thread concerns to_date() function. But it should concerns to_timestamp() also. So I suppose that should be a different patch for this last case. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] to_date_valid()

2016-08-15 Thread Artur Zakirov
string and input format string - result date/timestamp validation -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] to_date_valid()

2016-08-15 Thread Artur Zakirov
nd still passed. They fail now. Documentation is also updated. Regards, Is it right and "true" way to validate date by extra transforming and comparison? Maybe validate date by using ValidateDate(). Attached sample patch. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com R

Re: [HACKERS] Bug in to_timestamp().

2016-08-11 Thread Artur Zakirov
al rules for formatting. I will be grateful for notes and remarks. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 7830334..5656245 100644 --- a/doc/src/sgml/func.sgml +++

[HACKERS] pg_upgrade: exit_hook_registered variable

2016-07-28 Thread Artur Zakirov
Hello hackers, I noticed that exit_hook_registered variable in start_postmaster() is local variable. Shouldn't it be a static variable? I attached a patch. Thank you! -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company diff --git a/src/bin/pg_up

Re: [HACKERS] ispell/hunspell imprecision in error message

2016-07-26 Thread Artur Zakirov
ell dictionary format supports only \"default\", \"long\", and \"num\" flag value" -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Bug in to_timestamp().

2016-07-14 Thread Artur Zakirov
--- 2016-03-01 15:43:36+03 (1 row) Here '2016-02-30' is wrong date. I didn't see any conclusion about this case in the thread. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] Patch: fix typo, duplicated word in indexam.sgml

2016-04-04 Thread Artur Zakirov
Hello, There is a duplicated word in indexam.sgml. The patch is attached. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company diff --git a/doc/src/sgml/indexam.sgml b/doc/src/sgml/indexam.sgml index b36889b..69edeea 100644 --- a/doc/src/sgml/indexam.sgml

Re: [HACKERS] unexpected result from to_tsvector

2016-03-30 Thread Artur Zakirov
lly I do not see any workarounds except a patch to PostgreSQL. By the way, Teodor committed the patch yesterday. -- Alex -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2016-03-29 Thread Artur Zakirov
am thinking so it should be solvable - you have to convert only keyword IF EXISTS or IF NOT EXISTS. Maybe there are not trivial solution, but this should be fixed. Hello, Can we do something like in the patch? This patch should be applied after the patch "0001-Suggest-IF-NOT-EXISTS-for-tab-c

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-25 Thread Artur Zakirov
ight(). There is not a problem with it because this weights are immutable and so there is not benefits from new function. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make chan

Re: [HACKERS] unexpected result from to_tsvector

2016-03-25 Thread Artur Zakirov
On 25.03.2016 19:15, David Steele wrote: On 3/25/16 12:14 PM, Artur Zakirov wrote: On 25.03.2016 18:19, David Steele wrote: Hi Artur, On 3/20/16 10:42 AM, Tom Lane wrote: "Shulgin, Oleksandr" writes: On Mar 20, 2016 01:09, "Dmitrii Golub" wrote: Alex, actually subd

Re: [HACKERS] unexpected result from to_tsvector

2016-03-25 Thread Artur Zakirov
that I forgot to mark as "need review". But then I noticed that Robert Haas marked the patch as "waiting on author" after my answer, and I returned "waiting on author". But I cant find any questions or comments to me after my last answer. Actually I think tha

Re: [HACKERS] Fuzzy substring searching with the pg_trgm extension

2016-03-22 Thread Artur Zakirov
I attached the patch, which fixes the pg_trgm documentation. On 19.03.2016 01:18, Artur Zakirov wrote: 2016-03-18 23:46 GMT+03:00 Jeff Janes mailto:jeff.ja...@gmail.com>>: <% and <<-> are not documented at all. Is that a deliberate choice? Since they were ad

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-21 Thread Artur Zakirov
3e0a92d. It seems that tsvector_op.c was not synchronized with the master. Got it, thanks! -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] unexpected result from to_tsvector

2016-03-19 Thread Artur Zakirov
nary | lexemes ---+-+-+--++--- host | Host | 123_yyy.zzz | {simple} | simple | {123_yyy.zzz} (1 row) On 14.03.2016 17:45, Artur Zakirov wrote: On 14.03.2016 16:22, Shulgin, Oleksandr wrote: Hm... now that does

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-03-18 Thread Artur Zakirov
looks good for me. I haven't any observation. The patch does its function correctly. I have tested it with a plugin, which writes DDL queries to the WAL using a hook and replicates this queries at subscribers. If Simon is not against, the patch can be marked as "Ready for Commiter&q

Re: [HACKERS] Fuzzy substring searching with the pg_trgm extension

2016-03-18 Thread Artur Zakirov
parent" operators and use them in the examples, and only mention %> > and <->> in passing, as the commutators. That is because <% and <<-> > take their arguments in the same order as word_similarity does. It > would be less confusing if the documentation and t

Re: [HACKERS] Fuzzy substring searching with the pg_trgm extension

2016-03-15 Thread Artur Zakirov
On 15.03.2016 17:28, David Steele wrote: On 3/14/16 12:27 PM, Artur Zakirov wrote: On 14.03.2016 18:48, David Steele wrote: Hi Jeff, On 2/25/16 5:00 PM, Jeff Janes wrote: But, It doesn't sound like I am going to win that debate. Given that, I don't think we need a different na

Re: [HACKERS] Fuzzy substring searching with the pg_trgm extension

2016-03-14 Thread Artur Zakirov
e comments about the word-boundary subtlety. But I think it was not enough. I rephrased the explanation of word_similarity() and %>. It is better now. But if it is not correct I can change the explanation. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgre

Re: [HACKERS] plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types

2016-03-14 Thread Artur Zakirov
This design is tolerant, because we should to support a design of + * polymorphic parameters, where a array value can be passed as anyelement + * or anyarray parameter. + */ + PLpgSQL_type * + plpgsql_derive_type(PLpgSQL_type *base_type, Here the word "array" occurs two times

Re: [HACKERS] unexpected result from to_tsvector

2016-03-14 Thread Artur Zakirov
potential IMO. -- Alex It seems reasonable to me. I like more first option. But I am not confident that we should allow 123_yyy.zzz to be recognized as a Host. By the way, in this question http://webmasters.stackexchange.com/a/775 you can see examples of domain names with numbers (but not subdomains). If th

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-03-08 Thread Artur Zakirov
of the patch. I removed the registry, renamed the 'send' to 'emit', documented the callback parameters properly. I also added the test to ddl.sql for the serialization and deserialization (and of course found a bug there) and in general fixed all the stuff Andres reported

Re: [HACKERS] unexpected result from to_tsvector

2016-03-07 Thread Artur Zakirov
//tools.ietf.org/html/rfc1035 page 8. Dmitrii Golub Thank you for the information. Fixed. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company *** a/src/backend/tsearch/wparser_def.c --- b/src/backend/tsearch/wparser_def.c *** *** 1121,1126 *

Re: [HACKERS] Confusing with commit time usage in logical decoding

2016-03-01 Thread Artur Zakirov
29.02.2016 14:18, Artur Zakirov wrote: Hello, I read this message http://www.postgresql.org/message-id/56d4197e.9050...@informatik.uni-kl.de Is this a bug or a typo? In DecodeCommit() in decode.c instead of: if (parsed->xinfo & XACT_XINFO_HAS_ORIGIN) { origin_lsn = parsed->

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-02-29 Thread Artur Zakirov
(typid); + if (typid == TEXTOID || typid == VARCHAROID || typid == BPCHAROID) + return true; + return false; +} These functions was removed in 9acb9007de30b3daaa9efc16763c3bc6e3e0a92d. It seems that tsvector_op.c was not synchronized with the master. Conclu

[HACKERS] Confusing with commit time usage in logical decoding

2016-02-29 Thread Artur Zakirov
e = parsed->origin_timestamp; } should be: if (parsed->xinfo & XACT_XINFO_HAS_ORIGIN) { origin_lsn = parsed->origin_lsn; commit_time = parsed->origin_timestamp; } else commit_time = parsed->xact_time; -- Artur Zakirov Postgres Professional: http://www.postgrespro

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-02-27 Thread Artur Zakirov
LogicalErrorCallbackState state; ErrorContextCallback errcallback; -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types

2016-02-24 Thread Artur Zakirov
name is correct. I am think. But choosing names is hard work. The new name little bit more strongly show relation to work with referenced types. Agree. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-

[HACKERS] unexpected result from to_tsvector

2016-02-23 Thread Artur Zakirov
--++-- email | Email address | t...@123-reg.ro | {simple} | simple | {t...@123-reg.ro} (1 row) This patch allows to parser work with emails 't...@123-reg.ro', '1...@123-reg.ro' and 'test@123_reg.ro' correctly. -- Artur

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-02-20 Thread Artur Zakirov
wever they are included in the first version of the patch. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mail

Re: [HACKERS] plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types

2016-02-19 Thread Artur Zakirov
w.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services I noticed a little typo in the comment in the derive_type(): /* Return base_type, when it is a array already */ should be: /* Return base_type, when it is an array already */ -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Fuzzy substring searching with the pg_trgm extension

2016-02-17 Thread Artur Zakirov
hy I was asking. Hi! I attached new version of the patch. It fixes names of GUC variables and functions. Now the patch introduces: 1 - functions: - word_similarity() 2 - operators: - %> (and <%) - <->> (and <<->) 3 - GUC variables: - pg_trgm.similarity_

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2016-02-17 Thread Artur Zakirov
On 16.02.2016 18:14, Artur Zakirov wrote: I attached a new version of the patch. Sorry for noise. I attached new version of the patch. I saw mistakes in DecodeFlag(). This patch fix them. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company *** a/doc

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2016-02-16 Thread Artur Zakirov
ization. But I can add more comments. 5 Pls, add tests for new code. Added tests. Old sample dictionaries files was moved to the folder "dicts". New sample dictionaries files was added: - hunspell_sample_long.affix - hunspell_sample_long.dict - hunspell_sample_num.affix - hunsp

Re: [HACKERS] commitfest problem ?

2016-02-16 Thread Artur Zakirov
ot; (http://www.postgresql.org/message-id/56aa02ee.6090...@postgrespro.ru) was moved to the thread "[PATCH] we have added support for box type in SP-GiST index" by mistake. I had noticed it too late. I was writing into the wrong thread. And now commitfest shows wrong last attachment

Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2016-02-15 Thread Artur Zakirov
f a write "alter view if" and press psql writes: alter view IF EXISTS -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Fuzzy substring searching with the pg_trgm extension

2016-02-11 Thread Artur Zakirov
_limit to similarity_limit. sml_threshold is difficult to write I think, similarity_limit is more simple. 2 - subword_similarity() to word_similarity(). -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hac

Re: [HACKERS] Fuzzy substring searching with the pg_trgm extension

2016-02-11 Thread Artur Zakirov
1 sml_limit GUC variable (options: similarity_limit, sml_threshold) 2 subword_similarity(). Actually, it finds most similar word (not substring!) from whole string. word_similarity? word_in_string_similarity? substring_similarity_pos() could be a separate patch. -- Artur Zakirov Postgres Professional:

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2016-02-11 Thread Artur Zakirov
there are more comments. I wanted to send fixed patch after adding all comments that I want to add. But I can send the patch now. Also I will merge this commit http://www.postgresql.org/message-id/e1atf9o-0001ga...@gemulon.postgresql.org 5 Pls, add tests for new code. I will add. --

Re: [HACKERS] Mac OS: invalid byte sequence for encoding "UTF8"

2016-02-11 Thread Artur Zakirov
On 11.02.2016 03:33, Tom Lane wrote: Artur Zakirov writes: [ tsearch_aff_parse_v1.patch ] I've pushed this with some corrections --- notably, I did not like the lack of buffer-overrun prevention, and it did the wrong thing if a line had more than one trailing space character. We

Re: [HACKERS] Mac OS: invalid byte sequence for encoding "UTF8"

2016-02-11 Thread Artur Zakirov
On 11.02.2016 01:19, Tom Lane wrote: I wrote: Artur Zakirov writes: I think this is not a bug. It is a normal behavior. In Mac OS sscanf() with the %s format reads the string one character at a time. The size of letter 'Ñ…' is 2. And sscanf() separate it into two wrong character

Re: [HACKERS] Mac OS: invalid byte sequence for encoding "UTF8"

2016-02-10 Thread Artur Zakirov
fname) with a help of sscanf. Could file name be in UTF-8 encoding here? This function reads the "blobs.toc" file. It lines have the following format: Where is blob_.dat. Therefore it should be safe too. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian P

Re: [HACKERS] Fuzzy substring searching with the pg_trgm extension

2016-02-10 Thread Artur Zakirov
On 02.02.2016 15:45, Artur Zakirov wrote: On 01.02.2016 20:12, Artur Zakirov wrote: I have changed the patch: 1 - trgm2.data was corrected, duplicates were deleted. 2 - I have added operators <<-> and <->> with GiST index supporting. A regression test will pass only w

Re: [HACKERS] Mac OS: invalid byte sequence for encoding "UTF8"

2016-02-10 Thread Artur Zakirov
acter at a time. The size of letter 'х' is 2. And sscanf() separate it into two wrong characters. In conclusion, I think in spell.c should be used sscanf() with %ls format. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgs

Re: [HACKERS] Fuzzy substring searching with the pg_trgm extension

2016-02-02 Thread Artur Zakirov
On 01.02.2016 20:12, Artur Zakirov wrote: I have changed the patch: 1 - trgm2.data was corrected, duplicates were deleted. 2 - I have added operators <<-> and <->> with GiST index supporting. A regression test will pass only with the patch http://www.postgre

Re: [HACKERS] Fuzzy substring searching with the pg_trgm extension

2016-02-01 Thread Artur Zakirov
On 29.01.2016 18:58, Artur Zakirov wrote: On 29.01.2016 18:39, Alvaro Herrera wrote: Teodor Sigaev wrote: The behavior of this function is surprising to me. select substring_similarity('dog' , 'hotdogpound') ; substring_similarity --

Re: [HACKERS] Fuzzy substring searching with the pg_trgm extension

2016-01-29 Thread Artur Zakirov
-- 1 (1 row) But this is wrong I think. They are completely different words. For searching a similar substring (not word) in a text maybe another function should be added? -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via p

Re: [HACKERS] Fuzzy substring searching with the pg_trgm extension

2016-01-29 Thread Artur Zakirov
ing, I think, it will be useful in some cases. We could call them <<-> and <->> , where the first corresponds to <% and the second to %> Agree I will add them. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [HACKERS] Mac OS: invalid byte sequence for encoding "UTF8"

2016-01-29 Thread Artur Zakirov
On 28.01.2016 17:42, Artur Zakirov wrote: On 27.01.2016 15:28, Artur Zakirov wrote: On 27.01.2016 14:14, Stas Kelvich wrote: Hi. I tried that and confirm strange behaviour. It seems that problem with small cyrillic letter ‘х’. (simplest obscene language filter? =) That can be reproduced with

Re: [HACKERS] Fuzzy substring searching with the pg_trgm extension

2016-01-29 Thread Artur Zakirov
On 21.01.2016 00:25, Alvaro Herrera wrote: Artur Zakirov wrote: I don't quite understand why aren't we using a custom GUC variable here. These already have SHOW and SET support ... Added GUC variables: - pg_trgm.limit - pg_trgm.substring_limit I added this variables to the doc

Re: [HACKERS] Mac OS: invalid byte sequence for encoding "UTF8"

2016-01-28 Thread Artur Zakirov
On 27.01.2016 15:28, Artur Zakirov wrote: On 27.01.2016 14:14, Stas Kelvich wrote: Hi. I tried that and confirm strange behaviour. It seems that problem with small cyrillic letter ‘х’. (simplest obscene language filter? =) That can be reproduced with simpler test Stas The test program

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2016-01-28 Thread Artur Zakirov
Sorry, I don't know why this thread was moved to another thread. I duplicate the patch here. On 28.01.2016 14:19, Alvaro Herrera wrote: Artur Zakirov wrote: I undo the changes and the error will be raised. I will update the patch soon. I don't think you ever did this. I'm

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2016-01-28 Thread Artur Zakirov
On 28.01.2016 14:19, Alvaro Herrera wrote: Artur Zakirov wrote: I undo the changes and the error will be raised. I will update the patch soon. I don't think you ever did this. I'm closing it now, but it sounds useful stuff so please do resubmit for 2016-03. I'm working

Re: [HACKERS] Mac OS: invalid byte sequence for encoding "UTF8"

2016-01-27 Thread Artur Zakirov
it works correctly and gives right output. I think the NIImportOOAffixes() in spell.c should be corrected to avoid this bug. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company #include #include #include char *src = "SFX Y хаться шу

Re: [HACKERS] Mac OS: invalid byte sequence for encoding "UTF8"

2016-01-27 Thread Artur Zakirov
шутся Although the output should be: SFX/Y/хаться/шутся/хаться -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] Mac OS: invalid byte sequence for encoding "UTF8"

2016-01-27 Thread Artur Zakirov
n from git and PostgreSQL 9.5 (probably also on 9.4.5). There is also the test to reproduce this bug in the attachment. Did you meet this bug? Do you have a solution or a workaround? Thanks in advance. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [HACKERS] easy way of copying regex_t

2016-01-25 Thread Artur Zakirov
accordingly in advance. But I guess we could do better now that we have dynamic shared memory, possibly allocating one segment per dictionary as needed, or something like that. regards Yes it would be better as we will not need to define the maximum size of the shared segment in post

Re: [HACKERS] easy way of copying regex_t

2016-01-24 Thread Artur Zakirov
dictionary is loaded only once. Dictionaries are not loaded for each backend. In current version of PostgreSQL dictionaires are loaded for each backend where it was requested. - saving of time. The first load of a dictionary takes much time. With this patch dictionaries will be loaded only once. -- Artur

Re: [HACKERS] Fuzzy substring searching with the pg_trgm extension

2016-01-15 Thread Artur Zakirov
o detailed regression testing, and (b) some larger document for more extensive testing. I'm not sure (b) is actually necessary. Overall I think the new functions could stand a lot more commentary. Thank you for a review. I will send fixed patch in a few days. -- Artur Zakirov Postgres Pro

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2016-01-09 Thread Artur Zakirov
On 09.01.2016 05:38, Alvaro Herrera wrote: Artur Zakirov wrote: Now almost all dictionaries are loaded into PostgreSQL. But the da_dk dictionary does not load. I see the following error: ERROR: invalid regular expression: quantifier operand invalid CONTEXT: line 439 of configuration file

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2016-01-09 Thread Artur Zakirov
Thanks for review. On 09.01.2016 02:04, Alvaro Herrera wrote: Artur Zakirov wrote: --- 74,80 typedef struct aff_struct { ! uint32 flag:16, type:1, flagflags:7

Re: [HACKERS] plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types

2015-12-21 Thread Artur Zakirov
only by adding %ARRAYTYPE and %ELEMENTTYPE. Maybe you will give some examples? -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company *** a/doc/src/sgml/plpgsql.sgml --- b/doc/src/sgml/plpgsql.sgml *** *** 710,715 SELECT merge_fields

Re: [HACKERS] Fuzzy substring searching with the pg_trgm extension

2015-12-18 Thread Artur Zakirov
On 18.12.2015 22:43, Artur Zakirov wrote: Hello. PostgreSQL has a contrib module named pg_trgm. It is used to the fuzzy text search. It provides some functions and operators for determining the similarity of the given texts using trigram matching. Sorry, I have forgotten to mark previous

Re: [HACKERS] Allow replication roles to use file access functions

2015-12-15 Thread Artur Zakirov
ined. Are there any pitfalls in this condition? -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-12-01 Thread Artur Zakirov
On 16.11.2015 15:51, Artur Zakirov wrote: On 10.11.2015 13:23, Artur Zakirov wrote: Link to patch in commitfest: https://commitfest.postgresql.org/8/420/ Link to regression tests: https://dl.dropboxusercontent.com/u/15423817/HunspellDictTest.tar.gz I have done some changes in documentation

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-11-16 Thread Artur Zakirov
On 10.11.2015 13:23, Artur Zakirov wrote: Link to patch in commitfest: https://commitfest.postgresql.org/8/420/ Link to regression tests: https://dl.dropboxusercontent.com/u/15423817/HunspellDictTest.tar.gz Hello! Do you have any remarks or comments about my patch? -- Artur Zakirov

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-11-10 Thread Artur Zakirov
08.11.2015 14:23, Artur Zakirov пишет: Thank you for reply. This was because of the flag field size of the SPELL struct. And long flags were being trancated in the .dict file. I attached new patch. It is temporary patch, not final. It can be done better. I have updated the patch and

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-11-08 Thread Artur Zakirov
flag field size of the SPELL struct. And long flags were being trancated in the .dict file. I attached new patch. It is temporary patch, not final. It can be done better. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company *** a/src/backend/tsearch

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-11-06 Thread Artur Zakirov
06.11.2015 12:33, Artur Zakirov пишет: Hello again! Patches === Link to commitfest: https://commitfest.postgresql.org/8/420/ -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-11-06 Thread Artur Zakirov
== There are also some parameters for compound words. But I am not sure that we want use this parameters. -- Artur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company *** a/src/backend/tsearch/spell.c --- b/src/backend/tsearch/spell.c *** *** 237,242

Re: [HACKERS] [PROPOSAL] Improvements of Hunspell dictionaries support

2015-10-26 Thread Artur Zakirov
20.10.2015 17:00, Artur Zakirov пишет: These flag types are used in affix files of such dictionaries as ar, br_fr, ca, ca_valencia, da_dk, en_ca, en_gb, en_us, fr, gl_es, is, ne_np, nl_nl, si_lk (from http://cgit.freedesktop.org/libreoffice/dictionaries/tree/). Now almost all dictionaries are

  1   2   >