Re: Alias hstore's ? to ~ so that it works with JDBC - Mailing list pgsql-hackers

From Seamus Abshere
Subject Re: Alias hstore's ? to ~ so that it works with JDBC
Date
Msg-id 5113206D.2060107@abshere.net
Whole thread Raw
In response to Alias hstore's ? to ~ so that it works with JDBC  (Seamus Abshere <seamus@abshere.net>)
List pgsql-hackers
tl;dr

Scala/JRuby/Clojure (any JVM-based language) + Postgres + hstore = 
awesome... why not just add a few lines to hstore--1.2.sql and make sure 
that all operators are available and indexable?

hi Andrew, hi merlin,

> use the existing "exist()" function

EXIST() can't use hstore's GiST or GIN indexes.

> Why not just provide an additional operator?
>
>     CREATE OPERATOR ~ (
>          LEFTARG = hstore,
>          RIGHTARG = text,
>          PROCEDURE = exist,
>          RESTRICT = contsel,
>          JOIN = contjoinsel
>     );

Since the goal is to get ? working on JDBC with indexes, I think you 
also have to do CREATE OPERATOR CLASS [1]

Best,
Seamus

[1] See my revision of hstore--1.1.sql at 
https://gist.github.com/seamusabshere/4715959/revisions


-- 
Seamus Abshere
seamus@abshere.net
https://github.com/seamusabshere



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: PATCH: Split stats file per database WAS: autovacuum stress-testing our system
Next
From: Alexander Korotkov
Date:
Subject: Re: Alias hstore's ? to ~ so that it works with JDBC