Re: revised hstore patch

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: pgsql(at)j-davis(dot)com (Jeff Davis), pgsql-hackers(at)postgresql(dot)org
Subject: Re: revised hstore patch
Date: 2009-07-22 00:51:10
Message-ID: 87iqhlmtfl.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Jeff" == Jeff Davis <pgsql(at)j-davis(dot)com> writes:

>> I'm prepared to give slightly more consideration to option #3:
>> make the new code read the old format as well as the new one. I
>> believe (though I have not yet tested) that it is possible to
>> reliably distinguish the two with relatively low overhead, though
>> the overhead would be nonzero, and do an in-core format conversion
>> (which would result in writing out the new format if anything
>> changed).

Jeff> It might be good to have a way to ensure that all values have
Jeff> been upgraded to the new format. Otherwise you have to
Jeff> permanently maintain the old format even across multiple
Jeff> upgrades. Maybe that's not a big deal, but I thought I'd bring
Jeff> 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)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2009-07-22 00:54:20 Re: revised hstore patch
Previous Message Andrew Gierth 2009-07-22 00:44:58 Re: revised hstore patch