Re: Alias hstore's ? to ~ so that it works with JDBC

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Seamus Abshere <seamus(at)abshere(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Alias hstore's ? to ~ so that it works with JDBC
Date: 2013-02-06 19:42:54
Message-ID: CAHyXU0yt2vJmdfRBJkNfNNCu6NHdPpi+Qd7y91JqU+aquqFNLg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Feb 6, 2013 at 12:00 PM, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
> On 02/06/2013 12:34 PM, Merlin Moncure wrote:
>>
>>
>> The point is that Postgres should not introduce language constraints
>> because of broken driver technology.
>
>
> +1
>
>
>> To move forward in your
>> particular case, consider:
>> *) switching to 'hstore defined()' function:
>
>
> good solution - but just use the existing "exist()" function.
>
>
>> *) hacking pg_operator (carefully look up and change oprname for the
>> specific hstore operator)
>
>
> bad solution. Why not just provide an additional operator?
>
> CREATE OPERATOR ~ (
> LEFTARG = hstore,
> RIGHTARG = text,
> PROCEDURE = exist,
> RESTRICT = contsel,
> JOIN = contjoinsel
> );

yeah, this is much less hacky way to go.

merlin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dev Kumkar 2013-02-06 20:18:01 Re: Facing authentication error on postgres 9.2 -> dblink functions
Previous Message Andrew Dunstan 2013-02-06 19:36:39 Re: JSON NULLs