Re: revised hstore patch - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: revised hstore patch
Date
Msg-id 87iqhlmtfl.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: revised hstore patch  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: revised hstore patch
List pgsql-hackers
>>>>> "Jeff" == Jeff Davis <pgsql@j-davis.com> writes:
>> I'm prepared to give slightly more consideration to option #3:>> make the new code read the old format as well as
thenew one. I>> believe (though I have not yet tested) that it is possible to>> reliably distinguish the two with
relativelylow overhead, though>> the overhead would be nonzero, and do an in-core format conversion>> (which would
resultin writing out the new format if anything>> changed).
 
Jeff> It might be good to have a way to ensure that all values haveJeff> been upgraded to the new format. Otherwise you
havetoJeff> permanently maintain the old format even across multipleJeff> upgrades. Maybe that's not a big deal, but I
thoughtI'd bringJeff> it up.
 

Running  ALTER TABLE foo ALTER COLUMN bar TYPE hstore USING bar || '';
on all of your hstore columns would suffice to ensure that, I believe.
(Subject to testing once I actually have code for it, of course.)

-- 
Andrew (irc:RhodiumToad)


pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: revised hstore patch
Next
From: Stephen Frost
Date:
Subject: Re: revised hstore patch