pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #9038: trgm must have operand in index creation
3+ messages / 3 participants
[nested] [flat]

* BUG #9038: trgm must have operand in index creation
@ 2014-01-30 10:35 craig.macdonald@glasgow.ac.uk
  0 siblings, 0 replies; 3+ messages in thread

From: craig.macdonald@glasgow.ac.uk @ 2014-01-30 10:35 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      9038
Logged by:          Craig Macdonald
Email address:      craig.macdonald@glasgow.ac.uk
PostgreSQL version: 9.2.0
Operating system:   Documentation
Description:        

The documentation at 
http://www.postgresql.org/docs/9.2/static/textsearch-indexes.html
is incorrect in the syntax of CREATE INDEX for GIN and GIST. According to
http://www.postgresql.org/docs/9.2/static/pgtrgm.html the keyword
gist_trgm_ops is also necessary:

test=> CREATE INDEX trgm_idx ON test_trgm USING gist (t);
ERROR:  data type text has no default operator class for access method
"gist"
test=> CREATE INDEX trgm_idx ON test_trgm USING gist (t gist_trgm_ops);
CREATE INDEX



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #9038: trgm must have operand in index creation
@ 2014-01-30 15:34 Tomáš Vondra <tv@fuzzy.cz>
  2014-01-30 18:01 ` Re: BUG #9038: trgm must have operand in index creation Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Tomáš Vondra @ 2014-01-30 15:34 UTC (permalink / raw)
  To: pgsql-bugs

No it's not. The documentation about full-text clearly states that the column needs to be either tsvector or tsquery, but you're clearly using text.

Tomas

craig.macdonald@glasgow.ac.uknapsal/a:

>The following bug has been logged on the website:
>
>Bug reference:      9038
>Logged by:          Craig Macdonald
>Email address:      craig.macdonald@glasgow.ac.uk
>PostgreSQL version: 9.2.0
>Operating system:   Documentation
>Description:        
>
>The documentation at 
>http://www.postgresql.org/docs/9.2/static/textsearch-indexes.html
>is incorrect in the syntax of CREATE INDEX for GIN and GIST. According to
>http://www.postgresql.org/docs/9.2/static/pgtrgm.html the keyword
>gist_trgm_ops is also necessary:
>
>test=> CREATE INDEX trgm_idx ON test_trgm USING gist (t);
>ERROR:  data type text has no default operator class for access method
>"gist"
>test=> CREATE INDEX trgm_idx ON test_trgm USING gist (t gist_trgm_ops);
>CREATE INDEX
>
>
>
>-- 
>Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
>To make changes to your subscription:
>http://www.postgresql.org/mailpref/pgsql-bugs

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #9038: trgm must have operand in index creation
  2014-01-30 15:34 Re: BUG #9038: trgm must have operand in index creation Tomáš Vondra <tv@fuzzy.cz>
@ 2014-01-30 18:01 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2014-01-30 18:01 UTC (permalink / raw)
  To: Tomáš Vondra <tv@fuzzy.cz>; +Cc: pgsql-bugs; craig.macdonald@glasgow.ac.uk

=?UTF-8?Q?Tom=C3=A1=C5=A1_Vondra?= <tv@fuzzy.cz> writes:
> craig.macdonald@glasgow.ac.uknapsal/a:
>> The documentation at 
>> http://www.postgresql.org/docs/9.2/static/textsearch-indexes.html
>> is incorrect in the syntax of CREATE INDEX for GIN and GIST. According to
>> http://www.postgresql.org/docs/9.2/static/pgtrgm.html the keyword
>> gist_trgm_ops is also necessary:

> No it's not. The documentation about full-text clearly states that the column needs to be either tsvector or tsquery, but you're clearly using text.

Yeah, Tomas is right: section 12.9 is discussing the core full-text-search
datatypes, which have nothing much to do with contrib/pg_trgm's
facilities.

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2014-01-30 18:01 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-01-30 10:35 BUG #9038: trgm must have operand in index creation craig.macdonald@glasgow.ac.uk
2014-01-30 15:34 Re: BUG #9038: trgm must have operand in index creation Tomáš Vondra <tv@fuzzy.cz>
2014-01-30 18:01 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox