Re: pg_migrator and an 8.3-compatible tsvector data type - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: pg_migrator and an 8.3-compatible tsvector data type
Date
Msg-id 200905310358.n4V3wvo13229@momjian.us
Whole thread Raw
In response to Re: pg_migrator and an 8.3-compatible tsvector data type  (Greg Stark <stark@enterprisedb.com>)
Responses Re: pg_migrator and an 8.3-compatible tsvector data type  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Greg Stark wrote:
> On Sat, May 30, 2009 at 6:23 PM, Bruce Momjian <bruce@momjian.us> wrote:
> >> I think this is basically a large-caliber foot gun. ?You're going to
> >> pretend that invalid data is valid, until the user gets around to fixing
> >> it?
> >
> > What choice do we have?
> 
> Well you can store the data in a new fake data type (or even just mark
> the column as a bytea -- since any varlena is as good as any other).
> Then provide this conversion function to create the new data.
> 
> I suppose that means you should drop the indexes since if you leave
> them things could get weird. But doing the conversion would have to
> rebuild indexes anyways so CREATE INDEX should run in the same time as
> that step of the conversion would have taken. It would be nice if you
> could leave them around so the conversion would rebuild them
> automatically, but that would require creating operators and an
> opclass for the fake data type which would be more of a pain than just
> marking the column as a bytea or a data type with no operators.

The way the restore works, you would have to call the data type
'tsvector', and then that oid is linked around in all sort of odd places
and you need to change them all, hence confusion.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_migrator and an 8.3-compatible tsvector data type
Next
From: Nikhil Sontakke
Date:
Subject: Re: ruby connect