| From: | Josh Berkus <josh(at)agliodbs(dot)com> |
|---|---|
| To: | Dimitri Fontaine <dfontaine(at)hi-media(dot)com> |
| Cc: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: hstore improvements? |
| Date: | 2009-03-23 22:34:12 |
| Message-ID: | 49C80E64.9070408@agliodbs.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 3/19/09 2:40 PM, Dimitri Fontaine wrote:
> Hi,
>
> Le 19 mars 09 à 21:23, Josh Berkus a écrit :
>>> One request I've had is to construct a record (of some supplied
>>> composite type) from an hstore.
>>>
>>> I'm not sure if this is even possible; I'm certainly not seeing a way
>>> to implement it. Am I missing something?
>>
>> Well, presumably you'd try to match hstore tags against the "columns"
>> of the composite type, and where a tag didn't exist, return NULL,and
>> where one isn't in the composite type, ignore it. All data would be TEXT.
>
>
> The problem is more how to have the parser know which data type to
> target, because you want to avoid having to create a new cast per each
> composite type you want to target.
Or you could just have it fail if there's no cast between TEXT and the
target type.
--Josh
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeff Davis | 2009-03-23 22:59:45 | Re: GIN fast-insert vs autovacuum scheduling |
| Previous Message | Andrew Gierth | 2009-03-23 20:34:11 | Re: contrib function naming, and upgrade issues |