Re: [HACKERS] Remove 1MB size limit in tsvector
On Tue, 1 Aug 2017 15:33:08 -0400 Robert Haas <robertmh...@gmail.com> wrote: > On Tue, Aug 1, 2017 at 3:10 PM, Ildus K > <i.kurbangal...@postgrespro.ru> wrote: > >> So this would break pg_upgrade for tsvector columns? > > > > I added a function that will convert old tsvectors on the fly. It's > > the approach used in hstore before. > > Does that mean the answer to the question that I asked is "yes, but I > have a workaround" or does it mean that the answer is "no"? > It's a workaround. DatumGetTSVector and DatumGetTSVectorCopy will upgrade tsvector on the fly if it has old format. Regards, Ildus Kurbangaliev -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Remove 1MB size limit in tsvector
On Tue, 1 Aug 2017 14:56:54 -0400 Robert Haaswrote: > On Tue, Aug 1, 2017 at 10:08 AM, Ildus Kurbangaliev > wrote: > > Historically tsvector type can't hold more than 1MB data. > > I want to propose a patch that removes that limit. > > > > That limit is created by 'pos' field from WordEntry, which have only > > 20 bits for storage. > > > > In the proposed patch I removed this field and instead of it I keep > > offsets only at each Nth item in WordEntry's array. > > So this would break pg_upgrade for tsvector columns? > I added a function that will convert old tsvectors on the fly. It's the approach used in hstore before. Regards, Ildus Kurbangaliev -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers