On 1/23/20 1:28 PM, Mike Lissner wrote:
You wrote:

  > Well it did not rebuilt the index("t1_name_idx") you created on name.

OK, so then the docs *are* wrong? They say that:

 > any indexes on the affected columns must still be rebuilt.

But that doesn't happen? Sorry to be persistent. I'm just a bit confused here.

My guess is that it is because in Postgres varchar is just text with an optional length restriction. I say optional because you can do:

CREATE TABLE t2 (id serial PRIMARY KEY, name varchar);

So as I understand it when you are go from varchar to text you are not really changing type, just the type oid. I tried searching the source for confirmation of this to no avail. A definitive answer is going to need come from someone with more knowledge of the internals.




--
Adrian Klaver
adrian.kla...@aklaver.com


Reply via email to