Hi,
I'm using the following in an SQL :
select (EACH(value)).key as measurement_key,
(EACH(value)).value as value
from t_reading_hstore;I'm assuming this will give two columns containing the key/value pairs in the hstore record.
The docs suggest the order of the keys/values returned is undetermined. That is a bit ambiguous to me.
The order is not a problem in this case: as long as the keys and values are returned in the SAME order, what that order is I don't care.
Just that the key is always returned in the same row as its value.
It does seem to work, at least in my test cases, but I need to know if that is just luck, or if it is a safe assumption to make.
Can anyone confirm this is a robust assumption for me?
Thanks
Brent Wood
Principal Technician, Fisheries NIWA DDI: +64 (4) 3860529
|