Re: [PATCHES] a tsearch2 (8.2.4) dictionary that only filters out stopwords

2007-11-14 Thread Jan Urbański
Jan Urbański wrote: Great, I didn't know the API was that convenient in 8.3. I'll try posting a working patch for 8.3 during the weekend. Here's the patch for 8.3beta2. As was suggested I added a configuration parameter to the 'simple' dictionary called AcceptAll so now it can work in two

Re: [PATCHES] a tsearch2 (8.2.4) dictionary that only filters out stopwords

2007-11-14 Thread Jan Urbański
This bit should be replaced with defGetBoolean. Otherwise it looks reasonably sane. Fixed that, thank you. Regards, Jan Urbanski -- Jan Urbanski GPG key ID: E583D7D2 ouden estin diff -Naur postgresql-8.3beta2-orig/doc/src/sgml/textsearch.sgml

Re: [PATCHES] Miscalculation in IsCheckpointOnSchedule()

2007-11-14 Thread Heikki Linnakangas
Tom Lane wrote: ITAGAKI Takahiro [EMAIL PROTECTED] writes: -((double) (int32) (recptr.xrecoff - ckpt_start_recptr.xrecoff)) / XLogSegSize) / +((double) recptr.xrecoff - (double) ckpt_start_recptr.xrecoff) / XLogSegSize) / Surely this makes matters worse, not

Re: [PATCHES] Miscalculation in IsCheckpointOnSchedule()

2007-11-14 Thread Heikki Linnakangas
Heikki Linnakangas wrote: Tom Lane wrote: ITAGAKI Takahiro [EMAIL PROTECTED] writes: - ((double) (int32) (recptr.xrecoff - ckpt_start_recptr.xrecoff)) / XLogSegSize) / + ((double) recptr.xrecoff - (double) ckpt_start_recptr.xrecoff) / XLogSegSize) / Surely this makes matters

Re: [PATCHES] Fix pg_dump dependency on postgres.h

2007-11-14 Thread Alvaro Herrera
Zdenek Kotala wrote: Zdenek Kotala wrote: Zdenek Kotala wrote: Attached patch removes pg_dump dependency on postgres.h. The main reason for that was discussed there: http://archives.postgresql.org/pgsql-hackers/2007-10/msg01261.php I found two problems there. One is that I forgot

Re: [PATCHES] Fix pg_dump dependency on postgres.h

2007-11-14 Thread Zdenek Kotala
Alvaro Herrera wrote: Zdenek Kotala wrote: Zdenek Kotala wrote: Zdenek Kotala wrote: Attached patch removes pg_dump dependency on postgres.h. The main reason for that was discussed there: http://archives.postgresql.org/pgsql-hackers/2007-10/msg01261.php I found two problems there. One is

Re: [PATCHES] Fix pg_dump dependency on postgres.h

2007-11-14 Thread Alvaro Herrera
Zdenek Kotala wrote: Alvaro Herrera wrote: 3) Put following fake into keyword.c before include parse.h line. It is easiest way. #define TYPE_IS_DECLARED 1 #define YYLTYPE_IS_DECLARED 1 #define YYLTYPE void* #define YYSTYPE void* New version of patch is attached. I selected variant 3 as a

Re: [PATCHES] Fix pg_dump dependency on postgres.h

2007-11-14 Thread Zdenek Kotala
Alvaro Herrera wrote: Zdenek Kotala wrote: Alvaro Herrera wrote: 3) Put following fake into keyword.c before include parse.h line. It is easiest way. #define TYPE_IS_DECLARED 1 #define YYLTYPE_IS_DECLARED 1 #define YYLTYPE void* #define YYSTYPE void* New version of patch is attached. I

Re: [PATCHES] Fix pg_dump dependency on postgres.h

2007-11-14 Thread Tom Lane
Alvaro Herrera [EMAIL PROTECTED] writes: Zdenek Kotala wrote: What do you mean not very portable? What could be problem there? I'm not sure. My point is that it seems your parse.h requires TYPE_IS_DECLARED, but mine doesn't. What else could be lurking in there that requires a specific fix?

Re: [PATCHES] a tsearch2 (8.2.4) dictionary that only filters out stopwords

2007-11-14 Thread Bruce Momjian
Tom Lane wrote: This patch: http://archives.postgresql.org/pgsql-patches/2007-11/msg00137.php seems simple and useful enough that I think we ought to slip it into 8.3, even though we are far past feature freeze. As the simple dictionary type stands in CVS HEAD, it is only useful as the

Re: [PATCHES] Fix pg_dump dependency on postgres.h

2007-11-14 Thread Tom Lane
Zdenek Kotala [EMAIL PROTECTED] writes: TYPE_IS_DECLARED was my mistake. It should be YYSTYPE_IS_DECLARED. It works because YYSTYPE is also defined and #ifdef checks both. Copy and paste :( error. Sorry for confusion. I'm going to send new version. [ after further review... ] It looks to me

Re: [PATCHES] Fix pg_dump dependency on postgres.h

2007-11-14 Thread Zdenek Kotala
Tom Lane wrote: Alvaro Herrera [EMAIL PROTECTED] writes: Zdenek Kotala wrote: What do you mean not very portable? What could be problem there? I'm not sure. My point is that it seems your parse.h requires TYPE_IS_DECLARED, but mine doesn't. What else could be lurking in there that

Re: [PATCHES] a tsearch2 (8.2.4) dictionary that only filters out stopwords

2007-11-14 Thread Tom Lane
Oleg Bartunov [EMAIL PROTECTED] writes: On Wed, 14 Nov 2007, Tom Lane wrote: One thought that came to mind is that the option name should be just Accept not AcceptAll. To me All implies that it would accept *everything* ... including stopwords. wait, I remind the problem with filters. How

Re: [PATCHES] a tsearch2 (8.2.4) dictionary that only filters out stopwords

2007-11-14 Thread Oleg Bartunov
On Wed, 14 Nov 2007, Tom Lane wrote: Oleg Bartunov [EMAIL PROTECTED] writes: Let's consider one example - removing accents. In the past I always recommend people to use regex functions before to_tsvector conversion to remove accents, but recently I was noticed that such trick doesn't work with

Re: [PATCHES] a tsearch2 (8.2.4) dictionary that only filters out stopwords

2007-11-14 Thread Tom Lane
=?UTF-8?B?SmFuIFVyYmHFhHNraQ==?= [EMAIL PROTECTED] writes: This bit should be replaced with defGetBoolean. Otherwise it looks reasonably sane. Fixed that, thank you. Applied with minor revisions (changed the parameter name, avoided probably-insignificant memory leak).

Re: [PATCHES] a tsearch2 (8.2.4) dictionary that only filters out stopwords

2007-11-14 Thread Oleg Bartunov
On Wed, 14 Nov 2007, Tom Lane wrote: Oleg Bartunov [EMAIL PROTECTED] writes: On Wed, 14 Nov 2007, Tom Lane wrote: One thought that came to mind is that the option name should be just Accept not AcceptAll. To me All implies that it would accept *everything* ... including stopwords. wait, I

Re: [PATCHES] a tsearch2 (8.2.4) dictionary that only filters out stopwords

2007-11-14 Thread Oleg Bartunov
On Wed, 14 Nov 2007, Tom Lane wrote: Oleg Bartunov [EMAIL PROTECTED] writes: On Wed, 14 Nov 2007, Tom Lane wrote: Huh? This is just an option for the simple dictionary, it's got nothing to do with thesaurus AFAICS. I can assign simple dictionary as a normalization dictionary for thesaurus

Re: [PATCHES] Miscalculation in IsCheckpointOnSchedule()

2007-11-14 Thread Tom Lane
ITAGAKI Takahiro [EMAIL PROTECTED] writes: Tom Lane [EMAIL PROTECTED] wrote: Surely this makes matters worse, not better. What happens near a segment boundary crossing? Here is the dumped progres information by the attached patch (only for debug purpose). Oh, I take that back. I was

Re: [PATCHES] krb_match_realm

2007-11-14 Thread Henry B. Hotz
On Nov 9, 2007, at 5:24 AM, Magnus Hagander wrote: On Tue, 2007-11-06 at 18:10 -0800, Henry B. Hotz wrote: On Nov 6, 2007, at 6:27 AM, Magnus Hagander wrote: On Fri, Nov 02, 2007 at 11:23:30AM -0700, Henry B. Hotz wrote: I'm not entirely sure what the intended semantics of krb_match_realm

Re: [PATCHES] Doc patch to clarify text search example

2007-11-14 Thread Tom Lane
Simon Riggs [EMAIL PROTECTED] writes: Short patch to clarify the name of the column used for the text search index example, so everybody is clear it is a column name. Applied, thanks. regards, tom lane ---(end of

Re: [PATCHES] a tsearch2 (8.2.4) dictionary that only filters out stopwords

2007-11-14 Thread Tom Lane
Oleg Bartunov [EMAIL PROTECTED] writes: On Wed, 14 Nov 2007, Tom Lane wrote: Huh? This is just an option for the simple dictionary, it's got nothing to do with thesaurus AFAICS. I can assign simple dictionary as a normalization dictionary for thesaurus Sure. So what? You wouldn't use this