Giter Site home page Giter Site logo

Comments (8)

adunstan avatar adunstan commented on July 25, 2024

You can do similar things with json_object - it was written for just this purpose. See https://bitbucket.org/qooleot/json_object

I doubt we'll ever do hstore, because it's not a builtin type and almost certainly never will be, but we could do a json value I guess. It's not on my priority list, though, meaning either someone else will have to do it, or someone will have to pay me to do it, or you'll probably have to wait a long time.

from redis_fdw.

TrurlMcByte avatar TrurlMcByte commented on July 25, 2024

in last 9.3 already exists function hstore_to_json(hstore) in default contribution

from redis_fdw.

adunstan avatar adunstan commented on July 25, 2024

Yes, I know. I wrote it. But calling hstore_to_json(hstore(val)) is
horribly inefficient. And it requires you to have the hstore extension
installed, which many people do not.

On 11/25/2013 02:57 PM, Trurl McByte wrote:

in last 9.3 already exists function hstore_to_json(hstore) in default
contribution


Reply to this email directly or view it on GitHub
#4 (comment).

from redis_fdw.

TrurlMcByte avatar TrurlMcByte commented on July 25, 2024

hstore long time was only one easy/lazy alternative for complicated data (was also xml, but...)
And now hstore is supported solution "from the box" and it's very useful for mass/production.
in any case json functionality still very limited (no any of "?&", "?|" operators) and my first example looks better as

select key,json_object(value) as val from redis0_hash1 where (json_object(value)->'var1')::text <> ''

but better it's will be like

-- hstore: CREATE FOREIGN TABLE redis0_hash1 (key text, value hstore)...
select key, value->'var1', value->'var2' as val from redis0_hash1 where value ? 'var1';
-- OR json: CREATE FOREIGN TABLE redis0_hash1 (key text, value json)...
select key, value->'var1', value->'var2' as val from redis0_hash1 where value->'var1'' <> '''

from redis_fdw.

adunstan avatar adunstan commented on July 25, 2024

As I mentioned before we will not ever have direct support for hstore
values, because that would make the module dependent on the hstore
module which it is not now, and I am not going to do that. We could do
json. If you want it you can a) do it yourself, b) pay someone else to
do it or c) wait until someone else gets around to it.

On 11/25/2013 03:34 PM, Trurl McByte wrote:

hstore long time was only one easy/lazy alternative for complicated
data (was also xml, but...)
And now hstore is supported solution "from the box" and it's very
useful for mass/production.
in any case json functionality still very limited (no any of "?&",
"?|" operators) and my first example looks better as

|select key,json_object(value) as val from redis0_hash1 where (json_object(value)->'var1')::text <> ''
|

but better it's will be like

|-- hstore: CREATE FOREIGN TABLE redis0_hash1 (key text, value hstore)...
select key, value->'var1', value->'var2' as val from redis0_hash1 where value ? 'var1';
-- OR json: CREATE FOREIGN TABLE redis0_hash1 (key text, value json)...
select key, value->'var1', value->'var2' as val from redis0_hash1 where value->'var1'' <> '''
|


Reply to this email directly or view it on GitHub
#4 (comment).

from redis_fdw.

TrurlMcByte avatar TrurlMcByte commented on July 25, 2024

mmm.... I'm selecting "a", wrap up it to go. )
Check my question, I'm just want to known if it's planned already.

from redis_fdw.

adunstan avatar adunstan commented on July 25, 2024

What part of "no" don't you understand?

from redis_fdw.

TrurlMcByte avatar TrurlMcByte commented on July 25, 2024

This one: "We could do"
Relax, I have same problems with my projects, anybody wants something strange, but I'm don't have time to do something usefulness to me.

from redis_fdw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.