pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
can't reproduce example
3+ messages / 3 participants
[nested] [flat]

* can't reproduce example
@ 2017-09-22 15:03  herve@duchesne.me
  0 siblings, 1 reply; 3+ messages in thread

From: herve@duchesne.me @ 2017-09-22 15:03 UTC (permalink / raw)
  To: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.5/static/rangetypes.html
Description:

I tried to reproduce the example : 
CREATE EXTENSION btree_gist;
CREATE TABLE room_reservation (
    room text,
    during tsrange,
    EXCLUDE USING GIST (room WITH =, during WITH &&)
);

but I got this error :
ERROR:  data type text has no default operator class for access method
"gist"
HINT:  You must specify an operator class for the index or define a default
operator class for the data type.

That means by default nobody is able to reproduce your example... Howto use
gist with text or varchar?

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


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

* Re: can't reproduce example
@ 2017-09-22 15:47  Tom Lane <tgl@sss.pgh.pa.us>
  parent: herve@duchesne.me
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2017-09-22 15:47 UTC (permalink / raw)
  To: herve@duchesne.me; +Cc: pgsql-docs

herve@duchesne.me writes:
> I tried to reproduce the example : 
> CREATE EXTENSION btree_gist;
> CREATE TABLE room_reservation (
>     room text,
>     during tsrange,
>     EXCLUDE USING GIST (room WITH =, during WITH &amp;&amp;)
> );

> but I got this error :
> ERROR:  data type text has no default operator class for access method
> &quot;gist&quot;

It works for me.  You sure you installed the extension successfully?

			regards, tom lane


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



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

* Re: can't reproduce example
@ 2017-09-25 09:38  Herve Duchesne <hduchesn@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Herve Duchesne @ 2017-09-25 09:38 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; herve@duchesne.me; +Cc: pgsql-docs

You are right,

CREATE EXTENSION btree_gist;

the command failed because I was not superuser. I did it as postgres 
user and It works now.

Thanks.



Le 22/09/2017 à 17:47, Tom Lane a écrit :
> herve@duchesne.me writes:
>> I tried to reproduce the example :
>> CREATE EXTENSION btree_gist;
>> CREATE TABLE room_reservation (
>>      room text,
>>      during tsrange,
>>      EXCLUDE USING GIST (room WITH =, during WITH &amp;&amp;)
>> );
>> but I got this error :
>> ERROR:  data type text has no default operator class for access method
>> &quot;gist&quot;
> It works for me.  You sure you installed the extension successfully?
>
> 			regards, tom lane



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



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


end of thread, other threads:[~2017-09-25 09:38 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-09-22 15:03 can't reproduce example herve@duchesne.me
2017-09-22 15:47 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-09-25 09:38   ` Herve Duchesne <hduchesn@gmail.com>

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