Re: My honours project - databases using dynamically attached entity-properties - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: My honours project - databases using dynamically attached entity-properties
Date
Msg-id 45FAA207.30401@dunslane.net
Whole thread Raw
In response to Re: My honours project - databases using dynamically attached entity-properties  (tomas@tuxteam.de)
Responses Re: My honours project - databases using dynamically attached entity-properties  (tomas@tuxteam.de)
List pgsql-hackers
tomas@tuxteam.de wrote:
>
>> Does hstore nest? My impression is that it doesn't. Which might well not 
>> matter, of course.
>>     
>
> If what you mean is to have "mappings of mappings" then no.
>
> Hstore implements a data type for a (finite) mapping (a set of key -> value
> pairs, think "hash" for perl folks), with operations like "H1 contains
> H2" (in the sense that all key-value pairs in H2 are also in H1)
> supported by an index. Keys and values are strings.
>
>   

As a perl folk I think of hashes as nestable :-). Unlike hstore, the 
keys are strings but the values can be anything, including a hashref or 
arrayref.

Anyway, this means that you can't use hstore to cover the same field as 
YAML or JSON. That doesn't mean it's not useful - far from it.

cheers

andrew


pgsql-hackers by date:

Previous
From: Robert Treat
Date:
Subject: Re: tsearch_core for inclusion
Next
From: Tom Lane
Date:
Subject: Re: UPDATE using sub selects